Better Volume Indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Better Volume Indicator

Postby Gidien » Wed Apr 27, 2011 1:25 am

This is a better Volume Indicator available on other Plattforms found at this website

http://emini-watch.com/free-stuff/volume-indicator/

I used the ProRealTime Code

Short describtion:

BetterVolume.png



Chart:

BetterVolumeChart.png


Code:

BetVol_V2.lua
(12.99 KiB) Downloaded 3208 times

BetVol with Level Alert.lua
(25.38 KiB) Downloaded 938 times
Gidien
FXCodeBase: Confirmed User
 
Posts: 106
Joined: Mon Feb 08, 2010 7:39 am
Location: Hamburg

Re: Better Volume Indicator

Postby Nikolay.Gekht » Wed Apr 27, 2011 8:46 am

I see that the original version is highlighting the bars as well. You can do the same in your indicator:

1) Create four streams, one indicator's stream and three internals for open, high, low and close prices:
Code: Select all
local O, H, L, C;

function Prepare()
    ...
    O = instance:addStream("O", core.Line, "O", "O", first, 0);
    H = instance:addInternalStream(first, 0);
    L = instance:addInternalStream(first, 0);
    C = instance:addInternalStream(first, 0);
end


2) Because your indicator is oscillator and is drawn in separate area - put your open price stream into main chart area:

Code: Select all
    core.host:execute("attachOuputToChart", "O");


3) Join O, H, L and C streams into candle group:

Code: Select all
instance:createCandleGroup("BH", "BH", O, H, L, C);


4) In update method, for the bars you need to highlight, fill O, H, L and C streams with candle data and set O stream color to the color you need to highlight the candle with

Code: Select all
function Update(period, mode)
    ...
    if needHighlight then
        O[period] = instance.source.open[period];
        H[period] = instance.source.high[period];
        L[period] = instance.source.low[period];
        C[period] = instance.source.close[period];
        O:setColor(period, highlighColor);
    end
    ...
end
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Better Volume Indicator

Postby alpha_bravo » Thu Apr 28, 2011 10:42 am

Too many signals(99.9% of them false), this is a crazy indicator.
alpha_bravo
 
Posts: 49
Joined: Thu Jan 13, 2011 3:51 pm

Re: Better Volume Indicator

Postby Gidien » Thu Apr 28, 2011 11:33 pm

Did you read the short describtion. This indicator couldn't give you a clear signal. Because every Color have two or more "signals".

for example:
Climax UP RED --
Can be New UP Trend, cont. Down Trend or a new TOP. This are three complete different informations about the market. in sum no clear "signal", but an idea of the market.

The other problem is, that we only have Tickvolumes on FXCM(i think all Forex Brokers) , we don't know anything about the money in the market., we only know how offen Price is updated.

This indicator don't give Buy or Sell signals, but possible can help the trader to make a decision.
Gidien
FXCodeBase: Confirmed User
 
Posts: 106
Joined: Mon Feb 08, 2010 7:39 am
Location: Hamburg

Re: Better Volume Indicator

Postby alpha_bravo » Fri Apr 29, 2011 9:57 am

What i meant was that the indicator is too busy, this is just an opinion, it may not give direct false signals, but it gives too many false considerations. i.e. it clouds judgement a lot.

Its a good idea and probably works well on CME or exchanges with priced volume, but i dont know about tick volume. Have a look at the pic below for ordinary volume vs. BETVOL; each new successive daily high on ordinary volume(session start 7am) calls a top nearly to the pip(doesn’t happen everyday of course, but its easier to take seriously).

Image

http://i52.tinypic.com/33pbm2c.png

What about an indicator that just painted the volume bar black when it hits a new session high,(with an input to denote session start or period lookback). Then 3 other editable parameters, for 3 defined volume thresholds...say for example green for 200, amber for 400, red for 600?

If you cant, could you even edit BETVOL so that it paints a new colour for new highs(from a definable start point)?...this would also work, as i could just make all the other colous the same!

Cheers
AB
alpha_bravo
 
Posts: 49
Joined: Thu Jan 13, 2011 3:51 pm

Re: Better Volume Indicator

Postby Laurus12 » Wed Nov 16, 2011 9:06 pm

Many thanks for the BV indicator Gidien. I am also wondering if you would care sharing the HLC bars indicator which you are showing in the picture with the BV indicator? I have tried to find it in the forum, but with no luck.

Thanks,
Laurus
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway

Re: Better Volume Indicator

Postby Gidien » Thu Nov 17, 2011 9:04 am

No problem,

here is the HLC HIGH-LOW-CLOSE-BAR Chart indicator.

HLC.lua
(1.47 KiB) Downloaded 1619 times
Gidien
FXCodeBase: Confirmed User
 
Posts: 106
Joined: Mon Feb 08, 2010 7:39 am
Location: Hamburg

Re: Better Volume Indicator

Postby Laurus12 » Thu Nov 17, 2011 2:45 pm

Great! Thank you very much Gidien. Tried it and works perfectly.

Just some thoughts here. Would it be possible to make it as an option to have the vertical bar line itself thicker? Like weight 1,2,3 and so on? And the same with the closing price "block"?

Thanks,
Laurus
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway

Re: Better Volume Indicator

Postby Apprentice » Thu Nov 17, 2011 6:08 pm

Unfortunately not. This option does not exist.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Better Volume Indicator

Postby Laurus12 » Thu Nov 17, 2011 7:57 pm

Ok. Good to know. Thank you Apprentice :)

Laurus
Laurus12
FXCodeBase: Confirmed User
 
Posts: 45
Joined: Tue Jan 26, 2010 6:49 pm
Location: Norway

Next

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 52 guests