Home Forums Ready-to-use Robots Prop Firm Robots FTMO Robot: V4.3: What’s new? Reply To: FTMO Robot: V4.3: What’s new?

#208919
Anonymous
Inactive

Here’s the code …. its trying to set the SL not open a “breakeven” order…

if(position.PosType==OP_BUY)
{
breakprice=position.OpenPrice+_Point*commission/position.Lots;
if(tick.bid-breakprice>=_Point*breakeven)
{
if(position.StopLossPrice<breakprice)
{
if(WriteLogFile)
logger.WriteLogRequest(“SetBreakEvenStop”,
“BreakPrice=”+DoubleToString(breakprice,_Digits));

ModifyPosition(breakprice,position.TakeProfitPrice);

Print(“SetBreakEvenStop(“,breakEven,”) set StopLoss to “,
DoubleToString(breakprice,_Digits),”, Bid=”,tick.bid);
}
}
}

Shopping Cart