Hello friend,
Why you comment it out the first time that you realize it may not work?
if(Smedia1<Pmedia1 && Smedia>Pmedia) { double price= Ask+dist*Point; int ticket= OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Bid-SL*Point,Bid+TP*Point,"compra",300,0,0); int ticket1= OrderSend(Symbol(),OP_BUYSTOP,0.10,price,3,(price-dist*Point),price+TP*Point,"compra",301,0,0);//x4times return; } /*if(Smedia1>Pmedia1&&Smedia<Pmedia) { double price= Bid-distanza*Point; int ticket=OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Ask+SL*Point,Ask-TP*Point,"vendere",302,0,0); return; }*/
Also "void" doesn't return a value.
TotOrders = OrdersTotal(); if (PreviousOrder>TotOrders) CloseALL(); PreviousOrder = TotOrders;
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
Hi, I write a code that open one order and four pending order, at the MA's cross.
But I want, that when for example, the BUY order take the SL, the other pending will close.
I write this code, but didn't work, help??