Though i have not read whole code but till i saw there are code lines belongs to magic numbertraderduke wrote: Sun May 28, 2017 11:23 am Mladen
I have been using this quick & dirty EA to test indicators for the last 4 years and haven't had any thing like this happen before. I cleaned up the magic number and made it simpler. The problem still exist in the strategy tester. I hope that is what you meant when you said :check the magic number.
thank you
Ray
see new EA
RK-35_MA_Squize-RevT-EA-v2-wtrendwdayw9-TrlS.mq4
line #31 : extern int MagicNumber = 1;
line #355 : ticket = OrderSend(Symbol(), OP_BUY, lotMM, myPrice, Slippage, 0, 0, comments, MagicNumber, 0, DodgerBlue);
line #370 : ticket = OrderSend(Symbol(), OP_BUY, lotMM, myPrice, Slippage, myStopLoss, myTakeProfit, comments,
MagicNumber, 0, DodgerBlue);
line #413 : ticket = OrderSend(Symbol(), OP_SELL, lotMM, myPrice, Slippage, 0, 0, comments,
MagicNumber, 0, Red);
line #454 : if ( OrderMagicNumber() != MagicNumber) continue;