Can't count pending orders
Everything is correct. I gave you my template. My object is named 'm_trade' - your object is named 'trade'.
My EA works after deleting
Symbol() == PositionGetSymbol(i) && MagicNumber == PositionGetInteger(POSITION_MAGIC)&&
and
OrderSelect(OrderGetTicket(i));
So, There are problems with the definitions of Symbol and Magic Number
My EA works after deleting
and
So, There are problems with the definitions of Symbol and Magic Number
Yes, you have a problem - you are designing the EA incorrectly. You are not doing the required initialization.
You have to do this in OnInut:
Forum on trading, automated trading systems and testing trading strategies
Vladimir Karputov, 2021.11.25 07:25
You have to do it in OnInit ()
m_trade.SetExpertMagicNumber(InpMagic);
Hello everyone, I have a simple problem with Buy-Limit order
I want just one order to put but while backtesting I see unlimited orders put every tick
and these are my codes
while :
I hope if there are mistakes in my codes, I discover them
Thanks