buy and sell stop
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
if (OrdersTotal()==0) int sellticket = OrderSend(…
This if only applies to the SellStop (no brackets/braces). Once you open it, the if applying to the BuyStop will always be false. -
Check your return codes, and report your errors (including market prices and your variables). Don't look at GLE/LE unless you have an error. Don't just silence the compiler (strict), it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum 2012.05.20
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles 25 March 2014
sorry I'm just new here, thanks for the advice
hi, can anybody tell me what's wrong with this code? only sell stop is opened