Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

volume surge indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pianopilot
Posted : Thursday, May 21, 2015 3:48:05 PM
Registered User
Joined: 5/27/2011
Posts: 45

Hi Bruce,

Does your vs indicator give a reading from data at the beginning or end of the current time bar. For instace, with 5-min candles on the chart, and the curser over the 5-min bar, is the indicator below showing the value of your vs indicator at the beinning or end of the 5-min candle?

Your formula was given on the forum April 27, 2009.

Thanks, Ed

 

Bruce_L
Posted : Thursday, May 21, 2015 4:46:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you are talking about the RealCode given in the Above Average Volume topic, all past volume bars used in the calculations use the volume through the end of the bar. The current intraday bar uses the volume so far in the bar at the time of calculation.

While the number of bars used for previous days matches the number of bars used for the current day, no attempt is made to account for differences resulting from the current bar possibly being only a partial bar.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pianopilot
Posted : Friday, May 22, 2015 12:15:53 PM
Registered User
Joined: 5/27/2011
Posts: 45

Bruce, Your VS Formula given April 27, 2009 is:

If Time Frame.TotalDays<=1 AndAlso Period>=2 Then

   Dim Start(Period-1) As Integr

   Dim DayCount As Integer = -1

   Dim Bar Count As Singe = 0

   Dim Sum(1) As Single

   Dim SMA As New System.Collections.Generic.List(Of Single)

   For i As Integer = 1 To Volume.Line.Count -1

            If Volume.Line.DateValue(i).DayOfYear <> Volume.Line.Date Value(i-1).DayOf Year Then

                      DayCount += 1

                      BarCount =0

                      Sum(0)= 0

                      Sum(1) = 0

                      If DayCount >= Period Then

                             Dim j As Integer =0

                             For k As Integer= Start(DayCount Mod Period) To

Start((DayCount +1) Mod Period) -1

                                   SMA(j) -= Volume.Line.Value(k)

                                   j+= 1

                             Next

                      End If

                      Start(DayCount Mod Period) = i

        End If

        If DayCount >= 0 Then

                      If BarCount >SMA.Count Then

                                SMA.Add(Volume.Line.Value(i))

                      Else

                                SMA(BarCount) += Volume.Line.Value(i)

                      End If

         End If

         If DayCount >= Period -1 Then

                      Sum(0) += Volume.Line.Value(i)

                      Sum(1) += SMA(BarCount)

                      If Sum(1) > 0 Then

                          Add ToOuput(Volume.Line.DateValue(i), Sum(0)/ (Sum(1) / Period))

                    End   If

          End If

          BarCount += 1

     Next

End If

 

If it possible to utilize the block access for the VS indicator to feed data from another time source, so that the data feed is other than your primary chart? That way the VS could accumulate from a smaller or larger time-data feed, independent from the primary chart.

Thanks, Ed

 
 
Bruce_L
Posted : Friday, May 22, 2015 12:22:07 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The original Above Average Volume topic starts talking about having the indicator use a different time frame than the chart in its Wednesday, June 01, 2011 12:56:27 PM ET post and includes attached indicators allowing you to do this.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pianopilot
Posted : Friday, May 22, 2015 12:39:52 PM
Registered User
Joined: 5/27/2011
Posts: 45

Thanks for your help.

Ed

Bruce_L
Posted : Friday, May 22, 2015 1:06:46 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.