#Indicator '*************************************************************************************************************** ' * CUMULATIVE QUANTICKS * '*************************************************************************************************************** ' * Calculates the cumulative ticks during Regular Trading Hours for the NYSE * ' * * ' * Parameters: * ' * RTH_Start_Hour - Regular Trading Hours (RTH) Opening Hour * ' * RTH_Start_Minute - Regular Trading Hours (RTH) Opening Minute * '*************************************************************************************************************** ' * Thomas N. Helget * ' * 3/24/2020 * '*************************************************************************************************************** #PARAM "RTH_Start_Hour", 9, 0, 23 #PARAM "RTH_Start_Minute", 30, 0, 59 Dim BHr, BMn, NYSE As Integer ' Bar Hour, Bar Minute, NYSE TICK Close Dim LoNYSE, HiNYSE, LoScale, HiScale As Single ' Low and High Values of NYSE TICK for the day, ' Scale Values for Low and High NYSE TICK Dim Timeframe As Integer = SymbolData.Compression BHr = BarHour() ' Obtain the current hour and minute BMn = BarMinute() If Periodicity = 1 Then ' Are we viewing minute charts? If BHr = RTH_Start_Hour AND BMn = RTH_Start_Minute Then ' Initialize values at the open NYSE = GetClose("\$TICK") LoNYSE = GetClose("\$TICK") HiNYSE = GetClose("\$TICK") Else NYSE += GetClose("\$TICK") ' Thereafter increment the TICK value each bar If LoNYSE < LoNYSE[1] Then ' and remember the Low and High Tick values LoScale = LoNYSE ' for intelligent plotting End If If HiNYSE >= HiNYSE[1] Then HiScale = HiNYSE End If End If 'SetScales( LoScale, HiScale ) If NYSE > NYSE[1] Then ' Plot the Cumulative QuanTicks in green Plot("NYSE", NYSE, Green) ' when rising and red when falling Else Plot("NYSE", NYSE, Red) End If End If