Show your OnInit.
Vladimir Karputov #:
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
Amgad Samir Nassief Abdelmalek # :
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);
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
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