Moving Average Levels put into EA code?

Back to topics list To post a new topic, please log in or register
avatar
1
cpips 2009.07.03 02:51
 

I can set Moving Average Levels on my charts in the dialog box settings,


so how do I program the MA Levels into an EA lines of code?


To Buy when Price is between the MA Level values of up +20 and +40.

To Sell when Price is between the MA Level values of down -20 and -40.

Standard Moving Average Parameters allow for shift to the right and left only.

As MetaTrader lets me set MA Levels on the charts, surely there must be a way to program MA Levels into an EA.

Can anyone help me solve this puzzle?

 
avatar
2644
phy 2009.07.03 03:07 #
 

Use iMA() in your EA to get the moving average, then add/subtract from that to get the levels.

 
avatar
9
spot007 2010.06.21 19:40 #
 

I am also looking for the source code for this. The built-in indicator cannot be modified in editor, and the source code posted online is for the Custom Indicator "Moving Averages" (which does not let you add levels), not the built-in "Moving Average" which lets you add "Levels".

If someone can post the code or knows where to find it, there would be more than one person that would appreciate this!

 
Back to topics list  

To add comments, please log in or register