Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 09-28-2008, 03:05 AM   #1

Join Date: Mar 2008
Location: Valencia
Posts: 16
Ignore this user

Thanks: 3
Thanked 10 Times in 4 Posts

High Volume Spike Reversal Indicator Development

High Volume Spike Reversal Indicator Development:

Dear Trader's Lab Coders,

My Idea for this indicator began when I started noticing that when significant volume enters the market, many times this occurs at or near market turning points.

In order to more easily see volume's impact on price, I set out to start developing an indicator that would show greater volume than previous bars and confirmation of a pause and potential reversal by using a price pattern that would show potential weakness when the Volume Spike is at highs and strength when the Volume Spike is at lows.

I'm not trying to design this indicator to be traded solely on it's own without regard to trend, S/R, High and Low Volume areas, but it does many times pinpoint the start of the reversal. As well, I believe that by adding a few other conditions to this indicator that would take into account other volume indications based on Bid/Ask volume, such as the Delta (Buy Volume - Sell Volume) it would be possible to get some very nice trade setups that would work in conjunction with our own understanding of volume's affect on price.

The Parts of the Indicator:

Firstly, I am trying to determine what should signify high volume. I believe that volume is relative, and therefore some days 10,000 contracts in 5 minutes is a lot, and other days 20,000 contracts in 5 minutes is a lot. So, as of now I came up with the condition that if Volume is greater than the previous 6 bars, this should signify great volume. One can use whatever number they like, if one looks back 10 bars, you'll get fewer the signals, and if you look back only 2 bars, you'll get many more signals.

1. My first question to you is: How would you determine that a High Volume Spike is with "High Volume"? Do you have a method that would improve my very basic definition of High Volume that would weed out the high volume bars more reliably?

Secondly, I am trying to show a price pattern that shows rejection of the prices in the direction of the High Volume Spike. For Instance:

For a "buy signal", I'm looking for price on the bar after the High Volume Spike to close at or above the close of the High Volume Spike bar. As well, I am looking for a close on the bar after the High Volume Spike that is higher or equal to the open, and for the bar to close off of the lows. I basically ensure closing off the lows by this function (Close-Open)<(High-Low).

Here's the indicator as I have it now. I programmed it for Pro Real Time Charts, but am currently using a Ninja Trader Demo and have no idea how to program in C#. If any of you are interested in helping out, I am sure that everyone would really benefit as well...

Here's what I have so far:

--------------------------------------------------------
HIGH VOLUME SPIKE LONG SIGNAL

VolSpike=Low<=Low[1] AND Low<=Low[2] AND Close>=Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6]

VolSpike2=Low>=Low[1] AND Low<=Low[2] AND Close>=Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6]

IF VolSpike OR VolSpike2 THEN
structure=1

ELSE
structure=0
ENDIF

RETURN structure AS "VolSpike"

HIGH VOLUME SPIKE SHORT SIGNAL

VolSpike=High>=High[1] AND High>=High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6]

VolSpike2=High<=High[1] AND High>=High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND Volume[1]>Volume[2] AND Volume[1]>Volume[3] AND Volume[1]>Volume[4] AND Volume[1]>Volume[5] AND Volume[1]>Volume[6]

IF VolSpike OR VolSpike2 THEN
structure=1

ELSE
structure=0
ENDIF

RETURN structure AS "VolSpike"
---------------------------------------------------------

Lastly, I believe this indicator can be improved by including conditions that would show either Delta Divergence, or Delta shift from negative to positive for instance, for Long Trades. If we are looking for Long Signals, Delta Divergence could be added by requiring the Delta to be increasing positively into the signal bar, or a Delta shift would be for the Delta to go from negative to positive in the signal bar.

If any of you are interested in improving this indicator for Ninja Trader or any trading platform, and sharing, I would greatly appreciate it....

Regards,
David
Attached Thumbnails
High Volume Spike Reversal Indicator Development-volume-spike-example-complete.jpg  
davem1979 is offline  
Reply With Quote
Old 09-29-2008, 01:08 AM   #2

Join Date: Feb 2008
Location: zip
Posts: 54
Ignore this user

Thanks: 20
Thanked 11 Times in 8 Posts

Re: High Volume Spike Reversal Indicator Development

davem1979

Here is my quick hack at it. Seems simple enough. I've added the possibility of setting a period in the indicator in case you want to experiment with extending the Volume lookback. In its default state, it should be identical to yours. attached is a pic of the indicator on YM 1 min timframe although not sure how you would use it for entries/exits. I've also noticed that if the current bar is a doji you have to be careful before jumping in. Personally, I am looking to find a way specifically to enter on a breakout from pullbacks.



Here is the OnBarUpdate routine for Ninja (attached is the full zip)

Code:
        protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
			
//HIGH VOLUME SPIKE LONG SIGNAL
			if (CurrentBar > period)
			{
				if ( (Low[0]<=Low[1]) && (Low[0]<=Low[2]) &&
					(Close[0]>=Close[1]) && (Close[0]>=Open[0]) &&
					(Close[0]-Open[0])<(High[0]-Low[0]) &&
					//(Volume[1]>Volume[2]) && (Volume[1]>Volume[3]) && (Volume[1]>Volume[4]) && (Volume[1]>Volume[5]) && (Volume[1]>Volume[6]) )
					(Volume[1]>MAX(Volume,period)[2]) )
				{
					BackColor = Color.Green;
					//Spike.Set(1);
	
				}
				if ( (Low[0]>=Low[1]) && (Low[0]<=Low[2]) &&
					(Close[0]>=Close[1]) && (Close[0]>=Open[0]) &&
					((Close[0]-Open[0])<(High[0]-Low[0])) &&
					//(Volume[1]>Volume[2]) && (Volume[1]>Volume[3]) && (Volume[1]>Volume[4]) && (Volume[1]>Volume[5]) && (Volume[1]>Volume[6]) )
					(Volume[1]>MAX(Volume,period)[2]) )
				{
					BackColor = Color.Lime;
					//Spike.Set(1);
	
				}
				
				
//HIGH VOLUME SPIKE SHORT SIGNAL
				if( (High[0]>=High[1]) && (High[0]>=High[2]) && 
					(Close[0]<=Close[1]) && (Close[0]<=Open[0]) &&
					((Open[0]-Close[0])<(High[0]-Low[0])) &&
					//(Volume[1]>Volume[2]) && (Volume[1]>Volume[3]) && (Volume[1]>Volume[4]) && (Volume[1]>Volume[5]) && (Volume[1]>Volume[6]) )
					(Volume[1]>MAX(Volume,period)[2]) )
				{
					BackColor = Color.Crimson;
					//Spike.Set(-1);
				}
				
				if( (High[0]<=High[1]) && (High[0]>=High[2]) && 
					(Close[0]<=Close[1]) && (Close[0]<=Open[0]) &&
					((Open[0]-Close[0])<(High[0]-Low[0])) &&
					//(Volume[1]>Volume[2]) && (Volume[1]>Volume[3]) && (Volume[1]>Volume[4]) && (Volume[1]>Volume[5]) && (Volume[1]>Volume[6]) )
					(Volume[1]>MAX(Volume,period)[2]) )
				{
					BackColor = Color.Red;
					//Spike.Set(-1);
				}				

			}	
			
			
        }
Attached Thumbnails
High Volume Spike Reversal Indicator Development-ym-09-08-22_08_2008-1-min  
Attached Files
File Type: zip VolumeSpike.zip (3.8 KB, 333 views)
justlurkin is offline  
Reply With Quote
The Following User Says Thank You to justlurkin For This Useful Post:
HBBHVN (12-04-2008)
Old 09-29-2008, 05:58 AM   #3

Join Date: Mar 2008
Location: Valencia
Posts: 16
Ignore this user

Thanks: 3
Thanked 10 Times in 4 Posts

Re: High Volume Spike Reversal Indicator Development

Thank you JustLurkin! Nice Work!

I will load up the indicator and see if I can come up with some other conditions regarding delta or bid/ask volume that may improve its effectiveness. Please feel free to experiment. I'd love to know if you find some other conditions or have some ideas that may improve it.

Regards,
David

PS. Regarding your comment on entering on breakouts from pullbacks, one setup I personally am looking for is declining volume on the pullback and for the pullback to be into prices that previously had higher volume. Think, low volume coming back to a high volume area.

As well, if I am looking to go short on a pullback, I look at the Bid/Ask volume, and determine if the pullback is seeing more volume at the bid, or declining ask volume and for price to basically stop at a previous high volume area. For me, I like to enter on the pullbacks, and not wait for price to breakout. I think it really all depends on the context and what the current s/r and high and low volume areas are telling you.

I am learning to trade the Euro Bund now, and with that I also look what's happening on the DAX, DJ EuroStoxx50 and Schatz as well. Generally, when equities are at important s/r levels, this may at times, act as confirmation to a trade in the opposite direction on the BUND....
davem1979 is offline  
Reply With Quote
Old 10-01-2008, 06:52 AM   #4

Join Date: Jan 2008
Posts: 28
Ignore this user

Thanks: 5
Thanked 10 Times in 7 Posts

Re: High Volume Spike Reversal Indicator Development

blu-ray my friend...

maby u can translate it for copy and paste to EASYLANGUGAE


thanks alot ....
spyro is offline  
Reply With Quote
Old 10-01-2008, 08:43 AM   #5

Blu-Ray's Avatar

Join Date: Nov 2006
Location: England
Posts: 508
Ignore this user

Thanks: 164
Thanked 292 Times in 105 Posts

Re: High Volume Spike Reversal Indicator Development

Quote:
Originally Posted by spyro »
blu-ray my friend...

maby u can translate it for copy and paste to EASYLANGUGAE


thanks alot ....

No Probs, here you go :


Vars:
iVolume(0);

If bartype < 2 then iVolume = Ticks else IVolume = volume;



//HIGH VOLUME SPIKE LONG SIGNAL

Condition1=Low<=Low[1] AND Low<=Low[2] AND Close>=Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND iVolume[1]>iVolume[2] AND iVolume[1]>iVolume[3] AND iVolume[1]>iVolume[4] AND iVolume[1]>iVolume[5] AND iVolume[1]>iVolume[6];

Condition2=Low>=Low[1] AND Low<=Low[2] AND Close>=Close[1] AND Close>=Open AND (Close-Open)<(High-Low) AND iVolume[1]>iVolume[2] AND iVolume[1]>iVolume[3] AND iVolume[1]>iVolume[4] AND iVolume[1]>iVolume[5] AND iVolume[1]>iVolume[6];



//HIGH VOLUME SPIKE SHORT SIGNAL

Condition3=High>=High[1] AND High>=High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND iVolume[1]>iVolume[2] AND iVolume[1]>iVolume[3] AND iVolume[1]>iVolume[4] AND iVolume[1]>iVolume[5] AND iVolume[1]>iVolume[6];

Condition4=High<=High[1] AND High>=High[2] AND Close<=Close[1] AND Close<=Open AND (Open-Close)<(High-Low) AND iVolume[1]>iVolume[2] AND iVolume[1]>iVolume[3] AND iVolume[1]>iVolume[4] AND iVolume[1]>iVolume[5] AND iVolume[1]>iVolume[6];




IF Condition1 OR Condition2 then
Plot1(1,"Spike") else
If Condition3 or Condition4 then
Plot1(-1,"Spike")
else
Plot1(0,"Spike");




Hope this helps

Blu-Ray
__________________

“ Search is the ultimate expression of the power of the individual, using a computer, looking at the world, and finding exactly what they want ” – Eric Schmidt, Google
Blu-Ray is offline  
Reply With Quote
The Following 7 Users Say Thank You to Blu-Ray For This Useful Post:
daedalus (10-01-2008), HBBHVN (11-13-2008), khagans (10-02-2008), mikemiller (01-29-2010), sroubek (04-28-2010), Tams (06-19-2009), trade-samarai (06-14-2009)
Old 10-01-2008, 08:53 AM   #6

Join Date: Jan 2008
Posts: 28
Ignore this user

Thanks: 5
Thanked 10 Times in 7 Posts

Re: High Volume Spike Reversal Indicator Development

thanks my friend!!


spyro is offline  
Reply With Quote
The Following User Says Thank You to spyro For This Useful Post:
Blu-Ray (10-01-2008)
Old 10-01-2008, 11:47 AM   #7

Join Date: Mar 2008
Location: Valencia
Posts: 16
Ignore this user

Thanks: 3
Thanked 10 Times in 4 Posts

Re: High Volume Spike Reversal Indicator Development

Thanks Blu-Ray and Spyro!

I am looking for some possible uses of this indicator now. So far, it has taught me quite a bit about price action and volumes affect on price, like I have learned from the VSA threads. However, at the moment, this indicator although at times it gives very precise signals, it also gives very imprecise signals.

I am assuming there is some use for an indicator like this one in potential auto-trading systems, however one would need to somehow indicate support and resistance levels or give some sort of context for it to operate on, such as swing highs and lows.

So far, I just take notice of high volume when it enters the market, but the context around the volume is the most important thing. So, as for using this indicator other than a learning tool, I don't really see it being useful in discretionary trading as you can pick out the volume spikes visually on the chart on your own, without another indicator clouding your view.

For discretionary trading, I think this indicator lacks usefulness, as I would much rather just see Price, S/R, Bid/Ask Volume, and Delta and make the direction judgments myself. But, I now see how people are starting to use combinations of volume and price action to develop auto-trading systems, because systems can react much faster to Volume and Price than to moving averages or other lagging indicators.

If any of you have some ideas that you'd like to share about the usefulness or ability of this indicator to be developed further, I would love to hear from you.

Regards,
David
davem1979 is offline  
Reply With Quote
Old 10-01-2008, 05:42 PM   #8

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: High Volume Spike Reversal Indicator Development

Thanks BluRay - this is a very interesting idea. I like what you guys are coming up with!

I just modified it a bit so I could have different colors, but used in conjunction with S/R and fib's it could be very powerful!

Check out these two examples from the past couple days...

1 a simple 61.8 retracement... but how do you know if it will hold there? Volume Spike shows a buy and it works!



A double bottom in the ES, tests, and the volume spike says buy!



Another 61.8 retracement from yesterday...



And the last example from a couple days ago... sell signal on 62% fill of the gap, and a 78.6% retracement that gave a buy... both worked!



I think we just may be onto something here folks!

Cheers!
Attached Thumbnails
High Volume Spike Reversal Indicator Development-1.jpg   High Volume Spike Reversal Indicator Development-2.jpg   High Volume Spike Reversal Indicator Development-3.jpg   High Volume Spike Reversal Indicator Development-4.jpg  
daedalus is offline  
Reply With Quote
The Following User Says Thank You to daedalus For This Useful Post:
mikemiller (01-29-2010)

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Up/Down Volume Indicator Blu-Ray Trading Indicators 6 12-12-2010 05:10 PM
Cumulative Volume(Delta Buy/Sell) Indicator mdtmn Market Profile 5 07-27-2010 05:32 AM
Volume Delta Indicator Soultrader Trading Indicators 29 05-22-2009 01:08 AM
High Volume Spike Reversal Indicator davem1979 Trading Indicators 0 09-27-2008 11:22 AM
Better Volume Indicator user237509837 Coding Forum 16 08-29-2008 11:40 AM

All times are GMT -4. The time now is 11:57 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.