• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 11:12pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 11:12pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Simple Moving Average Vs. Moving Average? 8 replies

Problem getting moving average of ATR 21 replies

Does Moving average actually act as moving S/R ?? 20 replies

I can't see the problem in my moving average code 1 reply

Problem calculating cost or average 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe

problem with moving average

  • Post #1
  • Quote
  • First Post: Dec 4, 2009 6:31pm Dec 4, 2009 6:31pm
  •  ABoulfoul
  • | Joined Oct 2009 | Status: Member | 85 Posts
i have the following code in an indicator:

Inserted Code
if (High[i] > iMA(Symbol(),0,period,0,MODE_LWMA,PRICE_HIGH,0))
{
      //...
}

however, when i run the code and i put a linearly weighted moving average with the specified period applied at the high price, my indicator completely ignores this and processes the code even if the high is below the moving average.
  • Post #2
  • Quote
  • Dec 4, 2009 9:03pm Dec 4, 2009 9:03pm
  •  magnumfreak
  • Joined Nov 2007 | Status: Trying manual mode again | 2,210 Posts
change the last zero to an i, the way you have it set up it will always compare it to the current candle.
 
 
  • Post #3
  • Quote
  • Last Post: Dec 5, 2009 9:00am Dec 5, 2009 9:00am
  •  ABoulfoul
  • | Joined Oct 2009 | Status: Member | 85 Posts
Quoting magnumfreak
Disliked
change the last zero to an i, the way you have it set up it will always compare it to the current candle.
Ignored
newbie problem solved . thanks for the help.
 
 
  • Platform Tech
  • /
  • problem with moving average
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022