OrderSend - OP_SELL

To add comments, please log in or register
Vinicius Gonzalez
17
Vinicius Gonzalez  

Hello Guys,

In my project this works

OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);

but, this isn't work and i don't know why.

OrderSend(Symbol(),OP_SELL,0.1,Ask,3,Bid-15*Point,Bid+15*Point);

Thanks everybody.

Simon Gniadkowski
17644
Simon Gniadkowski  

For a BUY the TP has to be higher than the entry price and the SL has to be lower than the entry.

For a SELL the TP Has to be lower than the entry and the SL has to be higher than the entry.

For your BUY and SELL you have the same TP and SL.

Vinicius Gonzalez
17
Vinicius Gonzalez  
RaptorUK:

For a BUY the TP has to be higher than the entry price and the SL has to be lower than the entry.

For a SELL the TP Has to be lower than the entry and the SL has to be higher than the entry.

For your BUY and SELL you have the same TP and SL.


Thanks so much.
whroeder1
17945
whroeder1  
  1. For Buy tp=Bid+TP, sl=Bid-SL. For Sell tp=Ask-TP, SL=Ask+SL Note both the sign and the base.
  2. EA's must adjust for 4/5 digit brokers, TP, SL, AND slippage
//++++ These are adjusted for 5 digit brokers.
int     pips2points;    // slippage  3 pips    3=points    30=points
double  pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
int     init(){
    if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
    // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
To add comments, please log in or register