You could code the EA to search for a particular named object
Then you could draw a line and rename it so that the EA will find it and act accordingly
Yep, that's pretty much the way I do it (I get the EA to create the line for me either automatically or on button push, but no real difference).
Have a double variable that stores the price of said line.
Run code in OnChartEvent() to see if the line has moved, and update accordingly.
Run code in OnTick() to check where price is relative to the stored value.
.
Thanks guys for the help!
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,
This question might sound basic...
What can I do in my EA if I would like to be able to recognize a line in my chart.
I mean, the idea would be to draw (by hand) a line in a chart in MT4, then the EA shold trigger an alert when, for example, the price touches this line.
Not really sure if that can be achieved.
Thanks.