Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

volume Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ansinzhou
Posted : Wednesday, January 28, 2015 9:32:25 PM
Registered User
Joined: 10/6/2014
Posts: 34

Is there a way of figuring out what percentage of the volume is traded under the closing price of the day? Thank you

Bruce_L
Posted : Friday, January 30, 2015 3:46:08 PM


Worden Trainer

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

It depends on what you mean by possible.

To do this in an exact fashion, we would need to use tick data. And there isn't much tick data available in StockFinder.

We could approximate it by assigning all of the volume of each bar in an intraday time frame to its closing price and the looping back through the data every time the price changed to find out which bars had lower prices.

We could even do something a bit fancier and only assign a percentage of the volume of each bar equal to the percentage of the bar that is below the current price.

I can't think of a way to do this which wouldn't be fairly resource intensive, but we can probably create something as long as it doesn't need to be exact.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ansinzhou
Posted : Sunday, February 1, 2015 8:10:45 AM
Registered User
Joined: 10/6/2014
Posts: 34

Hi bruce, 

 The first way sounds like what I'm looking for. What would the code be for a indicator like that?

 And is there a tutorial video for looping codes on stockfinder? 

 

Thank you so much

 

Bruce_L
Posted : Wednesday, February 4, 2015 3:12:04 PM


Worden Trainer

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

If you mean using tick data, I tried to explain in my previous response why this is not possible. About the closest we can get to this would be the last option given.

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Percent Volume Below Price
'|******************************************************************
Static StartBar As Integer
If isFirstBar OrElse _
	Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
	StartBar = CurrentIndex
End If
If StartBar <> 0 Then
	Dim BelowVolume As Single = 0
	Dim TotalVolume As Single = 0
	For i As Integer = 0 To CurrentIndex - StartBar
		Dim Top As Single = Price.High(i)
		If Price.Value > Price.High(i) Then
			BelowVolume += Volume.Value(i)
		Else If Price.Value <= Price.Low(i) Then
			BelowVolume += 0
		Else
			BelowVolume += Volume.Value(i) * _
				(Price.Value - Price.Low(i)) / _
				(Price.High(i) - Price.Low(i))
		End If
		TotalVolume += Volume.Value(i)
	Next
	If TotalVolume <> 0 Then
		Plot = 100 * BelowVolume / TotalVolume
	Else
		Plot = Single.NaN
	End If
Else
	Plot = Single.NaN
End If

Assigning all of the value of a bar based on the value of the close of the bar would only be slightly shorter.

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Percent Volume Below Price
'|******************************************************************
Static StartBar As Integer
If isFirstBar OrElse _
	Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
	StartBar = CurrentIndex
End If
If StartBar <> 0 Then
	Dim BelowVolume As Single = 0
	Dim TotalVolume As Single = 0
	For i As Integer = 0 To CurrentIndex - StartBar
		Dim Top As Single = Price.High(i)
		If Price.Value > Price.Value(i) Then
			BelowVolume += Volume.Value(i)
		End If
		TotalVolume += Volume.Value(i)
	Next
	If TotalVolume <> 0 Then
		Plot = 100 * BelowVolume / TotalVolume
	Else
		Plot = Single.NaN
	End If
Else
	Plot = Single.NaN
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
anon76
Posted : Monday, February 16, 2015 8:10:25 PM
Registered User
Joined: 2/23/2010
Posts: 6

I am trying to determine the latest float, percent shares held by insiders and total volume last 13 weeks. I added them to a chart, but no numbers are plotted or exported. How do I get the data to appear?

Bruce_L
Posted : Tuesday, February 17, 2015 11:19:59 AM


Worden Trainer

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

Please contact technical support.



-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.