Try using Global Variables:
|

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi - hope there is a simple solution to this query.
I am writing an EA and I use a 'low' SMA (simple moving average) and a 'high' SMA - they could be anything say from 2-10 for the low and 20-100+ for the high.
At the moment I have my default values in my EA - say SMA-LO =5 and SMA-HI =25. Is there anyway that during the init process I could place these lines on the chart.
The way I do things means I have a template set-up with the SMA 5 and SMA 25 and then I have to assume that I have the correct values on the charts - i.e. those which match the EAs defaults.
Equally if I could 'READ' the SMA value from the chart and compare against the default value - and sound an alarm if they differ.
Just want to ensure the chart values match the EA's values