Forum

Need help with solving issue of a very complicated EA

Hello everyone. I'm a beginner MQL4 programmer and I've been stuck for months solving this issue. The code isn't really the cleanest as it is a chimera of all MQL4 knowledge that I took here in the forums but please bear with me. If you try to run the code it should have one running order and

Need help to check if pending order is fulfilled using magic number to do something

if ((OrderMagicNumber()== 0 )==(OrderType()==OP_BUY)) { OrderSend ( NULL ,OP_SELLSTOP,ls3,tpSell, 10 ,slSell,tpSellStop, NULL , 1 ); } I want my EA to only do the OrderSend if the OrderMagicNumber 0 (a pending order ) is fulfilled. I can't seem to make this work. I also tried this approach but it

Check if Magic Number = Order Type

if ((OrderMagicNumber()== 0 )==(OrderType()==OP_BUY)) { OrderSend ( NULL ,OP_SELLSTOP,ls3,tpSell, 10 ,slSell,tpSellStop, NULL , 1 ); } I want my EA to only do the OrderSend if the OrderMagicNumber 0 (a pending order ) is fulfilled. I can't seem to make this work. Any feedback would be greatly