When I first connect to my data provider in the morning and open a new chart, the chart will show so-many 'days back' of data. If I have a Swing indicator on the chart, it will carry over the swing value from the day before. So that the following code will reflect the Swing value from yesterday if there is not a new Swing pivot for the current day yet:
CurrentSH = Swing(Strength).SwingHigh[Strength];
I would like to NOT have the previous day's Swing pivots carry over to the next day. I want each day to start with CurrentSH=0 until a new pivot is created in the current trading day (let's say since Midnight). Is there a way to do this in a strategy?
Thanks!
Bryan
Comment