Currently I have a strategy that sets a stoploss at the Low - 6 ticks or High + 6 ticks @ entry depending upon if it is a long or short. I want to add another option under certain conditions.
I want to set either one stop loss OR the other, depending upon if a condition is true (if the wick of the entry candle is greater or less than a certain calculated tick value, saved to a variable diffLong or diffShort).
What would be the proper syntax to make this possible? So far I haven't had any success. I have tried different combinations, including simply adding a condition and action with brackets WITHIN the brackets for the entry condition, I have tried if, else if syntax. Nothing.
if (Condition for Entry) { if (ssdiff < 44) {SetStopLoss(@"TestStopShort", CalculationMode.Price, High[0] + 6 * TickSize, false);} SetStopLoss(@"TestStopShort", CalculationMode.Ticks, 20, false); EnterShort(1, Q, @"TestStopShort"); }
Thanks for any ideas.
Comment