A) Orders are not for Symbol()
B) Orders don't set Magic Number to MagicNumber
C) The code you wrote isn't being execute in start() - maybe conditional somewhere
A) Orders are not for Symbol()
B) Orders don't set Magic Number to MagicNumber
C) The code you wrote isn't being execute in start() - maybe conditional somewhere
What i am looking to do is:
Is this robot in a trade or has a limit order been placed? (code above)
if yes, do not proceed
Are trade conditions met?
if yes, place limit order.
I use an order placed flag - orderplaced = "yes"
but I clear pending orders and reset the flag to orderplaced = "no" on a new bar.
and I am counting on the above code from entering a new order if i am already in a trade.
but, the other day a trade signal happened again while I was in a trade. An the robot placed another trade.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Why doesn't the following keep me from entering a trade twice (orders are below the attached code)? Thanks inadvance for your help