![]() ![]() This plot only compares the last twenty hours. This way you can plot to see what % of volume today is returning compared to other opening days. I am looking for assistance for code that scans the first hour of the day for the past twenty days and compares it to the first hour of today's volume.Įxample: 9:30-10:30 volume for today, 9:30-10:30 volume for last Friday, etc. Def nMinutes = GetAggregationPeriod() / 60000 ĭef pvSum = fold idx = 1 to LookBack + 1 with a=0 do a + GetValue(volume, idx * nBars, LookBack * nBars) ĭef lastUp = if IsNaN(lastUp) then 0 else if (close > open) then VolPct else lastUp ĭef lastDn = if IsNaN(lastDn) then 0 else if (close open) and (VolPct > lastUp) then Vol.Color("bullish" ) else if close > open then Vol.Color("bullish smaller" ) else if close lastDn then Vol.Color("bearish" ) else Vol.Color("bearish smaller" )) ĪssignPriceColor(if (close > open) and (VolPct > lastUp) then Vol.Color("bullish" ) else if close > open then Vol.Color("bullish smaller" ) else if close lastDn then Vol.Color("bearish" ) else Vol.Color("bearish smaller" )) Hope this helps! ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |