There are more coding problems with this than I have time to list. I'll mention 2 ..
1) OrderDelete(OrderMagicNumber()== 7 ); // will not do what you expect as "OrderMagicNumber()== 7" is a boolean expression
2) check results of Order.... functions for any failures
Please check code samples here & elsewhere.
There are more coding problems with this than I have time to list. I'll mention 2 ..
1) OrderDelete(OrderMagicNumber()== 7 ); // will not do what you expect as "OrderMagicNumber()== 7" is a boolean expression
2) check results of Order.... functions for any failures
Please check code samples here & elsewhere.
Thank you brewmanz.
1458 | WHRoeder 2011.03.03 16:50https://www.mql5.com/en/forum/132153 |
WHRoeder - I know that this is my second post on the top of formu but now there are two problems that I want to understand.
First problem is Why Didn't send any orders and second problem how delete pending order with some ID.
I am working on underastanding how EA works and deleting the orders.
But I can't still understand why program didn't send any orders.
As you see down of this comment is the first sample of code and at the finish of that is function else.
So if there are not any orders on the market, program should send two orders. But didn't.
Can you tell me where is mistake, what i make wrong?
//+------------------------------------------------------------------+}
else {
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+6*point,4,Bid-52*point,Bid+20*point,"A BUY",1,expiration,Blue);
OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-8*point,4,Ask+50*point,Ask-22*point,"A SELL",2,expiration,Green);
}
}
return(0);
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use