texasnomad wrote >>
I tried writing a simple EA that buys whenever stochastics crosses up. The good news is that it buys at the correct time. The bad news is that it buys many, many times per bar.
I attempted to limit this by counting the total orders. It then makes sure that no orders are currently open before placing a trade. Or at last that's what I'm trying to do. How I restrict it to only place 1 trade at a time?
Look to your OrderSend, you dont add your MagicNumber here.
|
Thank you! That resolved my issue immediately. I really appreciate 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
I tried writing a simple EA that buys whenever stochastics crosses up. The good news is that it buys at the correct time. The bad news is that it buys many, many times per bar.
I attempted to limit this by counting the total orders. It then makes sure that no orders are currently open before placing a trade. Or at last that's what I'm trying to do. How I restrict it to only place 1 trade at a time?