| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Help W/ Avg Vol By TimeFrame ELD INPUTS: Days.Back( 5) ; VARIABLES: Days.Count( 0 ), Session.Minutes( 0 ), Total.Volume( 0 ), Volume.Average( 0 ), Volume.Median( 0 ), Counter( 0 ), Bars.per.Day( 0 ) ; IF BarType = 1 THEN BEGIN { plot intraday time charts only } Session.Minutes = TimeToMinutes(1515) - TimeToMinutes(0830) ; Bars.per.Day = Round( ( Session.Minutes/BarInterval )+ 0.49, 0 ) ; { round-up } //print(Counter); //print(barnumber); //Print("*******"); Total.Volume = 0 ; Days.Count = 0 ; FOR Counter = Round( BarInterval * 0.5, 0 ) TO Days.Back * Bars.per.Day BEGIN IF Time = Time[Counter] AND Days.Count < Days.Back THEN BEGIN Total.Volume = Total.Volume + UpTicks[Counter] + DownTicks[Counter] ; Days.Count = Days.Count + 1 ; END ; END ; if Days.Count <> 0 then Volume.Average = Total.Volume/Days.Count ; Volume.Median = median(Upticks + Downticks,Days.Count); Plot1( Volume.Median, "Median Vol" ) ; Plot2( Volume.Average, "AvgVol(ToD)" ) ; Plot3( UpTicks + DownTicks, "Volume" ) ; if upticks > downticks then setplotcolor(3,green); If plot3 > Plot1 and plot3 > Plot2 then Alert("High Volume"); END ; | ||
| |
|
| | #2 | ||
![]() | Re: Help W/ Avg Vol By TimeFrame ELD Quote:
what instrument and what time frame is your chart? what is it off by? | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Access Higher Timeframe Data | thewoj | Coding Forum | 3 | 02-29-2008 12:36 AM |
| How vital is the timeframe that you pick for your charts? | brownsfan019 | Technical Analysis | 29 | 11-22-2007 06:49 PM |