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?
Use iMA() in your EA to get the moving average, then add/subtract from that to get the levels.
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!
To add comments, please log in or register