Help needed to create a SM Volume indicator

schmurex

Help needed to create a SM Volume indicator

Post by schmurex »

Hello,
After following CJ's amazing thread then Dragon Lair also great thread and immersing myself in VSA, I thought that an indicator pointing out abnormal volume (too high or too low for the spread would be of great help.
So I'm trying to gauge the tickvolume in relationship with the spread of each bar or candle.
In a first attempt to do that I overlaid a spread indicator on the volume histogram and I could see at a glance for which bar the volume spikes out of the spread line and when the spread is huge compared to the volume.
2013-12-06_AUDNZD.H1.jpg
That's great except that as you scroll the chart, the moving scale of the chart window makes the volume and spread increase or shrink at a different rate.
What I'm looking for is to normalize the volume and spread in order to get a fix crossing of the spread line on the volume histogram.
There is probably a simple mathematical way to achieve that but I don't know it.
So if someone can explain it that would be an important first step.

In the mean time, I tried to modify the spread indicator to show the spread as a percentage of the average spread over n bars, wich is the ATR, and it works I can now display the same spread line but instead of indicating the spread in pips (ie 0.0028 it gives the value 1.45, 1 being the value of the ATR for this bar).
So encouraged by this result I tried to implement in the same indicator an histogram that would be Volume/AvgVolume. But when I do that the indicator stops working altoghether.
The idea behind that is to have the 2 values in the same range so they would increase or shrink at the same rate. For exemple instead of having 0.0028 pips and 8485 ticks in one bar Icould have 1.4 *avgspread and 2.6 *avgvolume.
The next step would be to find a common reference for the 2 maybe AvgSpread*AvgVolume or AvgVolume/AvgSpread??? trial and error...
I must say that I'm far to be a coder, I have read the courses of CoderGuru a few times and I can understand what some parts of the code does and I'm good at copying and pasting and some times it works but most of the time it doesn't.
So I post bellow the original spread indicator and my brilliant modification, which doesn't works
Thanks a lot
Jean-Louis
CDRW Spread.mq4
CDRW NormSpread.mq4
You do not have the required permissions to view the files attached to this post.
schmurex

Re: Help needed to create a SM Volume indicator

Post by schmurex »

Ok, already 30 views and no reply.
Maybe my explanation is too long...
So I would be very grateful if a coder could take a look at my indicator and show me what's wrong with it or how to get on the same window a line: spread/avgspread and an histogram: volume/avgvolume.
Thanks in advance.
J-L
User avatar
fok
Trader
Posts: 59
Joined: Wed Oct 23, 2013 1:15 pm
Location: Seasia

Re: Help needed to create a SM Volume indicator

Post by fok »

schmurex wrote:Ok, already 30 views and no reply.
Maybe my explanation is too long...
So I would be very grateful if a coder could take a look at my indicator and show me what's wrong with it or how to get on the same window a line: spread/avgspread and an histogram: volume/avgvolume.
Thanks in advance.
J-L
Did you take a look at Better Volume or Sonic's PVA volume indicators because they are working similar to your description (please google it/ forexfactory).

Sonic's PVA:

PVA Volumes-
The volume bars have special colors for special situations regarding individual candle
range, individual candle volume and average volume, and are designed to be used in
conjuction with the co-released SonicR PVA Candles indicator. Volume bars that are
emphasized with special colors for special situations will help you quickly associate a
volume bar to the corresponding candle of the same colors for a faster analysis.
A. Volume Bars for Climax Candles
Volume bars where volume is >= 200% of the average volume of the 10 most recent previous
bars, and volume bars where the product of candle spread x candle volume is >= the
highest for the 10 most recent previous bars
. Volume bars for bull candles are green
and for bear candles are red. The volume bars qualifying as "Climax" bars can trigger
an alert (see below).
b. Volume Bars for Candles With Volume Rising Above Average
Volume bars where volume is >= 150% of the average volume of the 10 most recent previous
bars. Volume bars for bull candles are blue and for bear candles are blue-violet.
C. Colors Display
The coding of colors allows the user to alter colors. But this must be done on the
External Inputs window "Inputs" tab, not the "Colors" tab.

nu.jpg
You do not have the required permissions to view the files attached to this post.
schmurex

Re: Help needed to create a SM Volume indicator

Post by schmurex »

Tim wrote:
schmurex wrote:Ok, already 30 views and no reply.
Maybe my explanation is too long...
So I would be very grateful if a coder could take a look at my indicator and show me what's wrong with it or how to get on the same window a line: spread/avgspread and an histogram: volume/avgvolume.
Thanks in advance.
J-L
Did you take a look at Better Volume or Sonic's PVA volume indicators because they are working similar to your description (please google it/ forexfactory).

Sonic's PVA:

PVA Volumes-
The volume bars have special colors for special situations regarding individual candle
range, individual candle volume and average volume, and are designed to be used in
conjuction with the co-released SonicR PVA Candles indicator. Volume bars that are
emphasized with special colors for special situations will help you quickly associate a
volume bar to the corresponding candle of the same colors for a faster analysis.
A. Volume Bars for Climax Candles
Volume bars where volume is >= 200% of the average volume of the 10 most recent previous
bars, and volume bars where the product of candle spread x candle volume is >= the
highest for the 10 most recent previous bars
. Volume bars for bull candles are green
and for bear candles are red. The volume bars qualifying as "Climax" bars can trigger
an alert (see below).
b. Volume Bars for Candles With Volume Rising Above Average
Volume bars where volume is >= 150% of the average volume of the 10 most recent previous
bars. Volume bars for bull candles are blue and for bear candles are blue-violet.
C. Colors Display
The coding of colors allows the user to alter colors. But this must be done on the
External Inputs window "Inputs" tab, not the "Colors" tab.

nu.jpg
Hello Tim,
Thanks for taking the time to stop by.
Yes I have spent some time with the sonic thread and the pic I have posted on the first post shows them (PVA candles and volume). I use the Better volume indicator as well and also the iBetter volume.
What I'm trying to achieve here is slighty different: the end product would be to show as a histogram how much volume in excess or in less compared to the spread on each bar.
But as a first step I thought that normalizing Volume and Spread would help towards this goal.
Thanks
J-L
MrLong

Re: Help needed to create a SM Volume indicator

Post by MrLong »

Hi schmurex,

I think these are the indicators you are looking for.

They are conversions from MultiCharts and Tradestation format, published on the Marney website.

Best Regards

Andy
You do not have the required permissions to view the files attached to this post.
schmurex

Re: Help needed to create a SM Volume indicator

Post by schmurex »

MrLong wrote:Hi schmurex,

I think these are the indicators you are looking for.

They are conversions from MultiCharts and Tradestation format, published on the Marney website.

Best Regards

Andy
Hi MrLong,
Thank you for the indicators.
They look interesting. Do you use them?
If you do I would like to know a little more about how they can help you.
It's not exactly what I was after.
I'm trying to get spread (or range) and Volume in the same indicator
Cheers
Jean-Louis
By the way your results with the EA are realy impressive!
schmurex

Re: Help needed to create a SM Volume indicator

Post by schmurex »

Ok,
problem solved!
Thanks to all the people who offered their generous help.
here it is:
SMTracks.mq4
I'm going to test it and improve it as needed.
If you find it of any interest, please give me some feed back
Cheers
J-L
You do not have the required permissions to view the files attached to this post.
User avatar
fok
Trader
Posts: 59
Joined: Wed Oct 23, 2013 1:15 pm
Location: Seasia

Re: Help needed to create a SM Volume indicator

Post by fok »

schmurex wrote:Ok,
problem solved!
Thanks to all the people who offered their generous help.
here it is:
SMTracks.mq4
I'm going to test it and improve it as needed.
If you find it of any interest, please give me some feed back
Cheers
J-L
Thanks a lot, schmurex.

Can you please explain your indi and how to use it?

Regards
SMTracks.png
Tim
You do not have the required permissions to view the files attached to this post.
MrLong

Re: Help needed to create a SM Volume indicator

Post by MrLong »

schmurex wrote:
MrLong wrote:Hi schmurex,

I think these are the indicators you are looking for.

They are conversions from MultiCharts and Tradestation format, published on the Marney website.

Best Regards

Andy
Hi MrLong,
Thank you for the indicators.
They look interesting. Do you use them?
If you do I would like to know a little more about how they can help you.
It's not exactly what I was after.
I'm trying to get spread (or range) and Volume in the same indicator
Cheers
Jean-Louis
By the way your results with the EA are realy impressive!
Go to this link: http://marneycapital.com/marney-indicators/

You can read all about them, over there, I don't use them but did last year.

Andy
User avatar
fok
Trader
Posts: 59
Joined: Wed Oct 23, 2013 1:15 pm
Location: Seasia

Re: Help needed to create a SM Volume indicator

Post by fok »

MrLong wrote:
schmurex wrote:
MrLong wrote:Hi schmurex,

I think these are the indicators you are looking for.

They are conversions from MultiCharts and Tradestation format, published on the Marney website.

Best Regards

Andy
Hi MrLong,
Thank you for the indicators.
They look interesting. Do you use them?
If you do I would like to know a little more about how they can help you.
It's not exactly what I was after.
I'm trying to get spread (or range) and Volume in the same indicator
Cheers
Jean-Louis
By the way your results with the EA are realy impressive!
Go to this link: http://marneycapital.com/marney-indicators/

You can read all about them, over there, I don't use them but did last year.

Andy
Thanks. :D
Post Reply

Return to “Coders Hangout”