I´m experiencing issues with my orders because it occurs that I´m triggered immediately after entry with StopLoss of ProfitTarget. It seems that SetStopLoss and SetProfitTarget are not "reset" after a trade (sometimes?) so that the next trade there are wrong doubles for the Stop and the Target.
I have SetStopLoss() and SetProfitTarget in State.Configure and also in OnBarupdate with eg
if (Positions[1].MarketPosition != MarketPosition.Short)
{SetStopLoss("Sba1a", CalculationMode.Ticks, 5, false);
SetStopLoss("Sba1b", CalculationMode.Ticks, 5, false);
SetProfitTarget("Sba1a", CalculationMode.Ticks, 4);
SetProfitTarget("Sba1b", CalculationMode.Ticks, 8);}
What might be the reason for this behavior?
Thank you!
Tony
Comment