Volume indicator to show Bullish/ Bearish Bias

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Is there anybody that can help with this?
Intention
To come up with a volume indicator that can show if volume pressure is bullish or bearish in nature and to show the difference (in bullishness/bearishness) over time.

I understand that volume is tick volume, but all the same it shows activity or interest at price levels.

Background
The standard MT4 volume indicator is pretty useless. It shows green if the volume is greater than the last bar, red if volume is less than the last bar. No use.
Attached “VolumeColor” indicator (by Enivid) is much better in that it indicates the volume “direction”, the volume bar colour matches the price bar, ie green price bar = green volume bar.
However, now that I have had time to use it I realise that is not the whole story. I think a better representation of where “the volume is acting” would be shown by relating the spread of the price bar and its open/close to the close. See attached chart, I have put vertical dotted lines on the obvious bars in question and numbered them.
Perhaps best shown by Bars 3 and 5. Both of these are shown as down red price bars, all volume is attributed to a down move, ie red volume bars mirroring a red price bar. However, the close is well above the “middle” of the bar, it is only red because it happened to close below the open.
Bar 10 in the other file shows this well.


Suggestions
1. I think volume bars (only volume bars, not price bars) should be showing green on those bars as the close is above the “middle”. But what do we take as the middle? Well how about.. (((high+low)/2)+(open+close)/2)/2=X (middle value)
If close is >X volume bar to be green, If close is <X volume bar to be red.

2. Now we have better representation of volume bars we can apply two moving averages to the volume.
One MA related to red volume bars, one MA related to green volume bars. This should show us whether buying or selling pressure is coming in/ going out. Suggest the moving averages are coloured red and green respectively.
Options on the Volume moving averages to be the normal ones ie; MA method, period, shift etc as per normal.
The volume bar colour needs to be able to change during the life of price bar and be set on its close. (If this is a problem, because it will affect the MAs, perhaps leave volume bar colour until bar close.)
If there was an option to make X = average of “high low”, or average “open close” only that would allow for some experimenting.
Many thanks in advance, comments/ feedback appreciated
thanks Paul
 

Attachments

  • 1.png
    1.png
    486 KB · Views: 154
  • 2.png
    2.png
    5.1 KB · Views: 152
  • VolumeColor.mq4
    4.1 KB · Views: 50

hayseed

Master Trader
Jul 27, 2010
1,014
259
149
usa
Thought I would give this one more try on its 2nd birthday!
Any help appreciated.
Regards, Paul
//----

hey paul..... moving averages work best when there is a value for every bar..... in the case of 2 buffered volume, there might be an extended period where a buffer would be 0...... this would cause issues.....

the indicator below will plot the volume green if the close is above the mid point, red otherwise......h
//-----

eurusd-d1-oanda-division1-paulvic-volume.png


//---

eurusd-h4-oanda-division1-pvv.png
 

Attachments

  • PaulVic Volume.ex4
    8.1 KB · Views: 17
  • PaulVic Volume.mq4
    2.4 KB · Views: 28
  • 👍
Reactions: PaulVic

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Hi Hayseed and the RugRats (is that a rock band!!!)
Anyway.. That is great thanks for the indicator.
I am not a programmer by any stretch of the imagination but think I understand your point re "... buffer = 0 ..."

Seems to work just fine, noted especially on the two bars to the right of the vertical red line, price bars marked red but actually is bullish volume attributed to them (spot on) followed by two lower volume ease of movement up bars all very bullish.

To the right of the chart, the bars that formed while I had the chart open, noted the volume bars change colour. At first I thought this was a problem, but seems to show the changing character of the bar (and bars at that level). After the up move (after vertical red bar) into the selling zone (previous high) all the volume bars start red, as if the smart money is allowing selling to come in but price goes no where, selling is being absorbed, bullish.
For the upmove to continue I think we would need to see overall volume diminish but also the proportion of red bars to green reduce (more green bars coming in). If not, I think it would show selling cannot be absorbed as there is to much, smart money would then allow price to fall so they can buy even cheaper.
Appreciated, many thanks and a happy prosperous new year
regards Paul
 

Attachments

  • 220104 new vol inicator.png
    220104 new vol inicator.png
    70.2 KB · Views: 25

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
I mentioned above the new volume indicator seems to work correctly with exception that the volume bar changes colour during its "construction" and remains mixed colour on completion. The final colour on the bar seems to be correct but I am finding it distracting looking back. Is there anyway to alter this such that on completion of the bar the whole volume bar becomes the final colour as it is now. I dont mind it changing colour during the time frame of the bar. A quick fix is to change time frame and go back to the time frame you are working in but as I scalp any distraction is best avoided !!!
Many thanks, this is a big help to me...
regards
Paul
 

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Is there anybody can help with this please, the final colour on the volume bar (currently it changes colour during its formation) needs to be set once it moves onto the next bar. Help appreciated..
 

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Hi Enivid
Thanks for getting back. The volume bar should be the colour that it finishes in in what ever time frame it is in.

This is the colour shown at the top of the volume bar before the next bar is started (see volume bars to right of green line on attached). On the attached, bars 1 and 2 are shown correct, whilst the price bars are red, it is clear the activity is in the upper half of the price bar and so the volume bar is painted green instead of the red of the price bar.
Volume Bars 3, 4 and 5 are shown multi coloured but the tops of the volume bars are coloured correctly all of them in this example should be green.

Note, If the chart is left for a period of time these multi coloured volume bars are formed, if you swap time frame and then back again the correct volume bars appear. This is why the bars to the left of the green line are correct, but to the right of the green line are multi coloured.
I really don't mind the bars changing colour while it is being formed, but would like to see it set correctly as the next bar is commenced.

Many thanks for your help, much appreciated. Regards, Paul
 

Attachments

  • 220104 new vol inicator 2.png
    220104 new vol inicator 2.png
    73.7 KB · Views: 14

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Enivid
That works just fine, much appreciated. Tried on M1 and 10 second chart and works just fine. Again, thank you very much..

Tip to anyone wanting to apply moving averages to this volume indicator as they wont work.
Dont apply this indicator first!!
In new indicator window apply the standard volume indicator.
Drag the moving average indicator to the new "Volume window" and use setting "Apply to.." "Previous Indicator"

I use following (all simple MA)
Main Moving average Period 21 shift -11 (Bold)
Secondary Period 8 shift -4 (blue dotted)
Third Period 4 shift -2 (red dotted)

Then drag the new Volume Indicator to this window and make the "Colors" line width bolder so it goes over and hides the standard volume indicator .
Ensure "Fixed Minimum" on both volume indicators is set same to zero.
 

PaulVic

Master Trader
May 26, 2016
52
3
69
Midlands, UK
Ok, so been using the updated volume indicator and it gives much better view on where it is acting. Now to try and recap on the initial thoughts.
1. Moving averages for up and down volume bars
Idea is to provide two moving averages (obviously user defined with user defined shift ) applied to the volume, one on the green volume bars only and one to the red down volume bars only.
I get (from post 4) the buffer =0 issue however there must be a way to overcome this, or rather side step it. For example side step it completely such that if an error shows up and an error message is given, due to the moving average not having enough bars in it to calculate, the user just has to up his moving average number, I can live with that. Perhaps a more involved means may be to look back at the date to identify what the minimum moving average could be.
2. Another additional idea is to apply an OBV type indicator based on the new volume bar colouring.

Any help appreciated