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
Yes, it probably would, but why would you want to create an endless loop?
If you want to open an order as soon as you attach the EA to the chart, then putting the order in init should work.
But if you put the order in an endless loop, it may open order after order(depending on your code
Also it would have to be coded so that it doesn't repeat the OrderSend if you change time-frames, restart the platform etc
Thank you for the answer! EA has written in code to prevent opening new orders. What is the other way (without endless loop) to open order if there is no price change? I'm looking what WHRoeder write but need some help with timer, OnTimer(), EventSetTimer(),...
Here is my code. EA still opening orders only when price change...
How do you know?
Price is changing all the time (usually)
I ran a test with this code. I disconnected from the internet, so no new ticks possible.
Timer worked perfectly