Add Moving Average for Trend indicator on EA

No PC at hand? Communicate with friends using your mobile phone!
20
2014.04.06 15:32

Hi all,

I need to add a single moving Average to an EA I am using, I will use the moving average to determine if the trend is up or down.

I just need to very simply compare the current candle MA to the last candle MA to give me my 'UP' or 'Down' trend indication (is MA greater or less than last candle MA?)

I'm confident in feeding the UP/Down into my Buy/Sell triggers, but I'm not sure how to add the MA or perform the above calc?

Any help would be much appreciated!

Thanks

Aug

13644
2014.04.06 15:45
augustus: I need to add a single moving Average to an EA ... but I'm not sure how to add the MA or perform the above calc?
20
2014.04.07 00:05
WHRoeder:

Thanks, I'll have a look at iMA and see how I get on.

Aug.

20
2014.04.07 08:02
augustus:

Thanks, I'll have a look at iMA and see how I get on.

Aug.

I've added a MA ok using iMA, but I'm not sure how to do the below - all the examples I can find are for MA crossovers, where as I want to compare the MA to itself to determine the slope.

I want to effectively be able to do this:

MA[1] > MA[2]

Thanks.

6283
2014.04.07 08:15
augustus:

I've added a MA ok using iMA, but I'm not sure how to do the below - all the examples I can find are for MA crossovers, where as I want to compare the MA to itself to determine the slope.

I want to effectively be able to do this:

MA[1] > MA[2]

Thanks.

a moving average of a moving average
iMAOnArray
20
2014.04.07 08:24
deVries:
a moving average of a moving average
iMAOnArray

Ah, thanks :)
13644
2014.04.07 12:21
augustus: MA to itself to determine the slope. MA[1] > MA[2]
iMAOnArray is irrelevant - the OP wants the slope. What is the last parameter in iMA? What does your 1 and 2 mean?
20
2014.04.07 16:20
WHRoeder:
iMAOnArray is irrelevant. What is the last parameter in iMA? What does your 1 and 2 mean?

If I have a 100 SMA moving average, I would like to compare the SMA value 1 candle ago against 2 candles ago, to determine if the slope of the SMA is currently up or down.

Thanks

13644
2014.04.07 16:23