Placing a trade at the average price you described would only work if the price retraces back to that average price.
Ignore future ticks by setting a flag when the trade is opened.

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 am currently working on my first EA.
I have currently coded and tested the functionality of determining trade entries. My question is in regards to managing the placement of these trades.
All my logic is placed within the start() function, and I only perform the logic within the first minute after a new bar has formed.
But if a symbol meets my criteria, every tick update currently would trigger a new order. This is where I am unsure how to efficiently handle the ticks.
Should I collect all the possible entries, calculate their averages, and then place one trade once that first minute has lapsed? Or would it be better to only take the first one? How would I then ignore future ticks?
Any ideas are welcome, I can provide more detail as well if needed.