Is anyone can give me a hint?
I just wonder what kind of difference between my ideal mindset?
Many thanks for who could give me a 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 all,
I want to write my own EA, but I encounter a problem while placing order. Is anyone could help? Here are my ideal processes as following
1. Check that there is no EA pending order on market, through ordertotal_0 and ordertotal_1 to confirm there is zero lots from this EA.
2. Check signal, if signal_sar and signal_rsi are buy, then go to next step. If signals are sell, then also go next step.
3. After signal check, place multiple orders in the same time through loop command for(...). According to my setting, it would only place five sell orders or buy orders.
4. After that, because this processes would check orders from EA, if there is any pending order from EA, it won't place any order anymore.
BUT, while I try on my demo account, this EA keep placing the orders over than five, which is the target quantity I set. Is anything wrong in my code?