Hi There,
I’ve been banging my head against the wall for a couple of days now and can’t seem to get a strategy that works perfectly on back testing, to work in live or playback accounts. The issue is, the strategy demands entering on a stop order with a very low 1 tick stop. In live, it seems like sometimes the prices moves so quick that the strategy enters, but the stop has already passed, so the SL order can’t be placed, leaving me with a naked position.
I’ve tried OnExectuionUpdate, I’ve tried offsets, I’ve tried a bunch of things. none of which place SL 1 tick below actual entry AND don’t affect the performance of the strategy too much.
Currently:
TickOff = 1; // offset hours from UTC
longStop = 1;
TP = 41;
shortStop= 1;
// Example entry (no real delta implemented yet)
if (longTrigger && Position.MarketPosition == MarketPosition.Flat)
{
SetStopLoss(“LongEntry”, CalculationMode.Ticks, longStop, false);
SetProfitTarget(“LongEntry”, CalculationMode.Ticks, TP);
EnterLongStopMarket(Close[0] + offset, “LongEntry”);
}
else if (shortTrigger && Position.MarketPosition == MarketPosition.Flat)
{
SetStopLoss(“ShortEntry”, CalculationMode.Ticks, shortStop, false);
SetProfitTarget(“ShortEntry”, CalculationMode.Ticks, TP);
EnterShortStopMarket(Close[0] - offset, “ShortEntry”);
}
Thanks in advance for any help.