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

Ratio of current volume to middle of yesterday's volume Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
oodles
Posted : Tuesday, April 10, 2012 11:09:12 AM

Registered User
Joined: 1/20/2005
Posts: 129

Hi Bruce,  I watch 5 minute candles.  78 candles each day.  I trade only high-volume stocks so there are always 78 candles each day.

I think I finally understand enough to know how to go about constructing this.  I'm not saying this will be the final key that finally allows me to drain the market into my account, but this is what I think I need next.  I just don't know enough to do it for myself.  Would you please create a RealCode indicator that will indicate the ratio of  the current candle's volume to the average volume of the previous day's middle 18 candles beginning 30 bars ago when the current candle is the 8:35AM candle?  I would like if each new (current) candle continues to be compared (ratio) to the same middle 38 candles from the most-recent trading day.  Thanks, if you can.  Richard

oodles
Posted : Tuesday, April 10, 2012 11:10:37 AM

Registered User
Joined: 1/20/2005
Posts: 129

plz change 8:35 to 9:35

Bruce_L
Posted : Tuesday, April 10, 2012 11:47:32 AM


Worden Trainer

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

Maybe something like the following?

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Volume Ratio
'|******************************************************************
Static Basis As Single
If isFirstBar Then
	Basis = Single.NaN
Else If Volume.DateValue.DayOfYear <> Volume.DateValue(1).DayOfYear Then
	Basis = Volume.AVG(18, 30)
	If Basis = 0 Then
		Basis = Single.NaN
	End If
End If
Plot = Volume.Value / Basis


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
oodles
Posted : Wednesday, April 11, 2012 11:44:26 AM

Registered User
Joined: 1/20/2005
Posts: 129

Hi Bruce, I have to do a bit more testing.  At first glance, it looks good.  It's a lot simpler than I would have thought.  Thank you.  Much appreciated.  Richard

oodles
Posted : Friday, April 13, 2012 12:03:13 PM

Registered User
Joined: 1/20/2005
Posts: 129

Hi Bruce,  This indicator still has promise.  I'm currently trying diferrent values to calculate my "Basis".  I've configured this indicator as a histogram (orange Bars).   Is it possible to have bars with values above 100 to be white, 50-100 yellow, 25-50 oange, 10-25 red, and below 10 to be blue?

Bruce_L
Posted : Friday, April 13, 2012 12:36:36 PM


Worden Trainer

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

You can right-click on the indicator and select Edit to adjust the Plot Style to Bar to display the indicator as a Histogram.

You could use the following RealCode Paint Scheme to get the desired colors:

Paint Schemes

PlotColor = Color.Blue
If Line.Value > 100 Then
	PlotColor = Color.White
Else If Line.Value > 50 Then
	PlotColor = Color.Yellow
Else If Line.Value > 25 Then
	PlotColor = Color.Orange
Else If Line.Value > 10 Then
	PlotColor = Color.Red
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
oodles
Posted : Friday, April 13, 2012 1:30:14 PM

Registered User
Joined: 1/20/2005
Posts: 129

Thanks, Bruce.  I'll give it a try this weekend.  Have a nice w-e.   Regards,  Richard

atomiccrow
Posted : Friday, April 13, 2012 1:43:31 PM
Registered User
Joined: 4/5/2012
Posts: 1

Hi Bruce:

 

Do you have any code for building Darvas Boxes? If I supplied you with MetaStock code could it be done? It's pretty simple really but I don't know how to write code -- Here it is in English:

So, in summary: We store the top and then see if it remains unpenetrated for three days (including that day). If it does, then we look for a low, repeating this process in reverse (and wait for three days, including that day). If the top gets penetrated before the low is firmly established, we scrap the previous numbers and repeat the whole process from scratch. This will probably require a minimum of five days. Then, we wait for a bar to penetrate the high (a buy signal) or the low (a sell signal)

What I am attempting is to find are all-time new stock highs, with at least a 50% increase over av daily volume -- then scan for the boxes in the stock data base.

Watching the training video, I thought it might be accomplished with conditons but being new to your product, I am not certain.

Eagerly awaiting for feedback. Thanks in advance.

Erik Sonne -- (email removed by moderator)

Bruce_L
Posted : Friday, April 13, 2012 1:50:38 PM


Worden Trainer

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

You may wish to review the Darvas boxes and Darvas Box Imitation topics. If you search for darvas in the charts section under Share | Browse other users shared items in the menus of StockFinder 5, you will actually find three different Darvas Box implementations.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
oodles
Posted : Saturday, April 21, 2012 12:06:28 PM

Registered User
Joined: 1/20/2005
Posts: 129

Hi Bruce, I just wanted to let you know the paint scheme you wrote works great!  I was able to add another color on my own.  Thanks again.   Richard

Bruce_L
Posted : Monday, April 23, 2012 8:04:36 AM


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.