dasilvja: if I create a bool variable for a MACD crossover and I want to draw an arrow or whatever. How do I write it so that it only draws an arrow one time and not on every tick?
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12

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
I'm frustrated because someone answered this for me but I can't find it in all my old posts and comments. I'm struggling to figure out how to run a segment of code only once, particularly when drawing an object. For example, if I create a bool variable for a MACD crossover and I want to draw an arrow or whatever. How do I write it so that it only draws an arrow one time and not on every tick?
Thanks in advance for your help. I really appreciate it!