I'm using the Swing indicator to set a stoploss in my strategy as follows:
For Long Trades:
stopOrder = ExitLongStop(0, true, Position.Quantity, Swing(7).SwingLow[0], stopName, signalName);
For Short Trades:
stopOrder = ExitShortStop(0, true, Position.Quantity, Swing(7).SwingHigh[0], stopName, signalName);
The problem is, the stops are not being placed where the Swing indicator is plotting with strength 7.
I noticed that the stops are being placed at the highs/lows of the current bar.
What is the proper way to pass the Swing High and Swing Low levels that the indicator plots on the chart to the ExitLongStop / ExitShortStop methods? Thank you!
Comment