I’m running 10 minute interval bars, but in cases of rare volatility the unrealized P/L will exceed my stop loss I’ve set (-4%). I need the rest of the variables for entries/exits to calculate on bar close, but the stop loss needs to be calculated at (what I assume to be) a lower interval rate so the close of the 10 minute bar doesn’t have a massive loss exceeding the -4%.
Is it best to set a lower interval bar specifically for this stop loss, and if so, how do I create a custom interval for this specific exit. Alternatively, if there’s an easier/better way of doing this (where the exit will occur before the end of the 10 minute interval if the unrealized P/L is met) I’d appreciate the advice.
Thanks
if (Position.GetProfitLoss(Close[0], PerformanceUnit.Percent) < -0.04)
{
ExitShortLimit(GetCurrentAsk(), "S1L", "S1");
ExitLongLimit(GetCurrentBid(), "L1L", "L1");
}
Comment