You already have the basis down for all the historical dates for nom/dem. So all you need to do now is before you do any of the historical dates, you want to do the current date first.
Assuming BarsInProgress == 0 is a 1min series and session closes at 2PM (aka 140000).
if (BarsInProgress == 0) { if (ToTime(Time[0]) == 135900) { ArrayList nom = new ArrayList(); nom.Add(Close[0] - Math.Min(MIN(Lows[dailyBars], k-1)[0], CurrentDayOHL().CurrentLow[0])); x=0; while (x < d) { nom.Add(Closes[dailyBars][x] - MIN(Lows[dailyBars],k)[x]); x++; } // denoms ArrayList den = new ArrayList(); den.Add(Math.Max(MAX(Highs[dailyBars], k-1)[0], CurrentDayOHL().CurrentHigh[0]) - Math.Min(MIN(Lows[dailyBars], k-1)[0], CurrentDayOHL().CurrentLow[0])); x=0; while (x < d) { den.Add(MAX(Highs[dailyBars],k)[x] - MIN(Lows[dailyBars],k)[x]); x++; } ... ... } }
Comment