Rec volumeTotal = if targetPeriod and !targetPeriod then volume else if targetPeriod then volumeTotal + volume else volumeTotal #URL# ĭef startCounter = SecondsFromTime(startTime) ĭef endCounter = SecondsTillTime(endTime) ĭef targetPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0 Wait for the buys to outnumber the sells (Turns Green) then make your decision.ĭef LBuying = VL * (CL - LL) / (HL - LL) ĭef LSelling = VL * (HL - CL) / (HL - LL) ĭef totVol = Round(Buying, 0) + Round(Selling, 0) ĭef buyPercent = ( Round(Buying, 0) / totVol ) * 100 ĭef sellPercent = ( Round(Selling, 0) / totVol ) * 100 ĪddLabel(Show_Labels, 'Total Vol: ' + volume(period = AggregationPeriod.DAY), Color.WHITE) ĪddLabel(yes, 'CurrentBar Vol: ' + volume, Color.LIGHT_GREEN) ĪddLabel(yes, 'LastBar Vol: ' + volume, Color.LIGHT_ORANGE) ĪddLabel(Show_Labels, ' BUYERS: ' + Round(Buying, 0) + ' - ' + Round(buyPercent, 0) + '%', if Buying > Selling then Color.LIGHT_GREEN else Color.BLACK) ĪddLabel(Show_Labels, ' SELLERS: ' + Round(Selling, 0) + ' - ' + Round(sellPercent, 0) + '%', if Selling > Buying then Color.LIGHT_RED else Color.BLACK) This Volume Label measures the percentage of buys and sells live.
#hint: Buy_Sell_Percent_Label - Created by.