My problem is when I enter more than 1 trades in same direction, the stop for the unfilled targets moves to an average of all the trades and the targets of the previous trades don’t get fill until the targets of last trade are fill.
How can I separate targets and stops from all trades in same direction.
Thanks
Here is my script
privatevoid ManageOrders()
{
if (Position.MarketPosition == MarketPosition.Long)
{
if (be2)
{
if ( High[0] >= Position.AvgPrice + (Target1*TickSize)) //this is the break even target 2
SetStopLoss("target2",CalculationMode.Price,Position.AvgPrice,false);
}
if(be3)
{
if ( High[0] >= Position.AvgPrice + (Target1*TickSize)) //this is the break even target 3
SetStopLoss("target3",CalculationMode.Price,Position.AvgPrice,false);
}
}
if (Position.MarketPosition == MarketPosition.Short)
{
if (be2)
{
if ( Low[0] <= Position.AvgPrice - (Target1*TickSize)) //this is the break even target 2
SetStopLoss("target2",CalculationMode.Price,Position.AvgPrice,false);
}
if(be3)
{
if ( Low[0] <= Position.AvgPrice - (Target1*TickSize)) //this is the break even target 3
SetStopLoss("target3",CalculationMode.Price,Position.AvgPrice,false);
}
}
}

Comment