Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Better Volume Indicator from ThinkScript for Amibroker (AFL)
I translated from ThinkScript: http://www.hotstockmarket.com/t/193355/thinkscript-better-volume-indicator
It is difference with another Better Volume Indicator I have. Sorry because my bad of English.
- Yellow – Low Volume for the size of the bar – Amateurs at work
- White – Climax down
- Blue -Climax up
- Red – Churn – Pros buying at lows OR unloading at highs
- Violet- Climax Churn – Pros taking profits at highs OR lows
- Gray – Normal (default) Bar
I also posted it in my blog.
Please comment in this website and my blog too.
http://vietvsa.blogspot.com/2013/07/better-volume-indicator.html
Screenshots
Similar Indicators / Formulas
Indicator / Formula
lookback = 8; Use2Bars = "Yes"; LowVol = "Yes"; ClimaxUp = "Yes"; ClimaxDown = "Yes"; Churn = "Yes"; ClimaxChurn = "Yes"; LowVolColor = 8; ClimaxUpColor = 9; ClimaxDownColor = 1; ChurnColor = 5; ClimaxChurnColor = 0; DefaultBarColor = 7; AvgColor = 0; Range = High-Low; Value1 = IIf (Close >= Open,Volume * ((Range) / ((2+(Range*Range)/10) * Range + (Open - Close))), Volume * (((Range + Close - Open)) / (2+(Range*Range)/10) * Range + (Close - Open))); Value2 = Volume - Value1; Value3 = Value1 + Value2; Value4 = Value1 * Range; Value5 = (Value1 - Value2) * Range; Value6 = Value2 * Range; Value7 = (Value2 - Value1) * Range; Value8 = IIf (Range != 0, Value1 / Range, 1); Value9 = IIf (Range != 0, (Value1 - Value2) / Range, 1); Value10 = IIf (Range != 0, Value2 / Range, 1); Value11 = IIf (Range != 0, (Value2 - Value1) / Range, 1); Value12 = IIf (Range != 0, Value3 / Range, 1); Value13 = IIf (Use2Bars=="Yes", Value3 + Ref(Value3,-1),1); Value14 = IIf (Use2Bars=="Yes", (Value1 + Ref(Value1,-1))*(HHV(High,2)-LLV(Low,2)),1); Value15 = IIf (Use2Bars=="Yes", (Value1 + Ref(Value1,-1)-Value2-Ref(Value2,-1))*(HHV(High,2)-LLV(Low,2)),1); Value16 = IIf (Use2Bars=="Yes", (Value2 + Ref(Value2,-1))*(HHV(High,2)-LLV(Low,2)),1); Value17 = IIf (Use2Bars=="Yes", (Value2 + Ref(Value2,-1)-Value1-Value1[1])*(HHV(High,2)-LLV(Low,2)),1); Value18 = IIf ((Use2Bars=="Yes" AND (HHV(High,2)!=LLV(Low,2))),(Value1+Ref(Value1,-1))/(HHV(High,2)-LLV(Low,2)),1); Value19 = IIf ((Use2Bars=="Yes" AND (HHV(High,2)!=LLV(Low,2))),(Value1+Ref(Value1,-1)-Value2-Ref(Value2,-1))/(HHV(High,2)-LLV(Low,2)),1); Value20 = IIf ((Use2Bars=="Yes" AND (HHV(High,2)!=LLV(Low,2))),(Value2+Ref(Value2,-1))/(HHV(High,2)-LLV(Low,2)),1); Value21 = IIf ((Use2Bars=="Yes" AND (HHV(High,2)!=LLV(Low,2))),(Value2+Ref(Value2,-1)-Value1-Ref(Value1,-1))/(HHV(High,2)-LLV(Low,2)),1); Value22 = IIf ((Use2Bars=="Yes" AND (HHV(High,2)!=LLV(Low,2))),Value13/(HHV(High,2)-LLV(Low,2)),1); Condition1 = IIf(Value3 == LLV(Value3, Lookback), 1, 0); Condition2 = IIf((Value4 == HHV(Value4, Lookback) AND Close > Open), 1, 0); Condition3 = IIf((Value5 == HHV(Value5, Lookback) AND Close > Open), 1, 0); Condition4 = IIf((Value6 == HHV(Value6, Lookback) AND Close < Open), 1, 0); Condition5 = IIf((Value7 == HHV(Value7, Lookback) AND Close < Open), 1, 0); Condition6 = IIf((Value8 == LLV(Value8, Lookback) AND Close < Open), 1, 0); Condition7 = IIf((Value9 == LLV(Value9, Lookback) AND Close < Open), 1, 0); Condition8 = IIf((Value10 == LLV(Value10, Lookback) AND Close > Open), 1, 0); Condition9 = IIf((Value11 == LLV(Value11, Lookback) AND Close > Open), 1, 0); Condition10 = IIf(Value12 == HHV(Value12, lookback), 1, 0); Condition11 = IIf (Use2Bars=="Yes" AND (Value13==LLV(Value13,Lookback) AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0); Condition12 = IIf (Use2Bars=="Yes" AND (Value14==HHV(Value14,Lookback) AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0); Condition13 = IIf (Use2Bars=="Yes" AND (Value15==HHV(Value15,Lookback) AND Close > Open AND Ref(Close,-1) < Ref(Open,-1)),1,0); Condition14 = IIf (Use2Bars=="Yes" AND (Value16==LLV(Value16,Lookback) AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0); Condition15 = IIf (Use2Bars=="Yes" AND (Value17==LLV(Value17,Lookback) AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0); Condition16 = IIf (Use2Bars=="Yes" AND (Value18==LLV(Value18,Lookback) AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0); Condition17 = IIf (Use2Bars=="Yes" AND (Value19==LLV(Value19,Lookback) AND Close > Open AND Ref(Close,-1) < Ref(Open,-1)),1,0); Condition18 = IIf (Use2Bars=="Yes" AND (Value20==LLV(Value20,Lookback) AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0); Condition19 = IIf (Use2Bars=="Yes" AND (Value21==LLV(Value21,Lookback) AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0); Condition20 = IIf (Use2Bars=="Yes" AND (Value22==LLV(Value22,Lookback)), 1,0); Color= IIf (ClimaxChurn== "Yes" AND (Condition10 OR Condition20) AND (Condition2 OR Condition3 OR Condition4 OR Condition5 OR Condition6 OR Condition7 OR Condition8 OR Condition9), colorViolet, IIf (LowVol== "Yes" AND (Condition1 OR Condition11) , colorYellow, IIf (ClimaxUp== "Yes" AND (Condition2 OR Condition3 OR Condition8 OR Condition9 OR Condition12 OR Condition13 OR Condition18 OR Condition19) , colorBlue, IIf (ClimaxDown== "Yes" AND (Condition4 OR condition5 OR Condition6 OR Condition7 OR Condition14 OR Condition15 OR Condition16 OR Condition17) ,colorWhite, IIf (Churn== "Yes" AND Condition10 OR Condition20,colorRed,colorGrey50 ))))); Plot(Volume, "Vol",Color,styleHistogram ); Plot(MA(Volume, lookback), "VolAvg",colorWhite, styleLine);
5 comments
Leave Comment
Please login here to leave a comment.
Back
Differrent chart, not the same as your picture. Just histogram. Would you please posting the original formula ?
Plot(Volume, “Vol”,Color,styleHistogram );
=> styleCandle
I fixed row has Value17 again, please modify it:
Value17 = IIf (Use2Bars==“Yes”, (Value2 + Ref(Value2,-1)-Value1-Ref(Value1,-1))*(HHV-LLV),1);
Hello anybody can make this indicator as in the picture above or make it thicker bars. thanks a lot.
Value1 calculation doesn’t match with http://emini-watch.com/free-stuff/volume-indicator/, corrected code is below –
lookback = 20;
Use2Bars = “Yes”;
LowVol = “Yes”;
ClimaxUp = “Yes”;
ClimaxDown = “Yes”;
Churn = “Yes”;
ClimaxChurn = “Yes”;
Range = High-Low;
Value11 = IIf(C>O,(Range/(2*Range+O-C))V,((Range+C-O)/(2Range+C-O))V);//IIf (Close > Open,Volume * ((Range) / ((2+(RangeRange)/10) * Range + (Open – Close))),Volume * (((Range + Close – Open)) / (2+(Range*Range)/10) * Range + (Close – Open)));
Value1 = IIf(C==O,0.5*V,Value11);
Value2 = Volume – Value1;
Value3 = abs(Value1 + Value2);
Value4 = Value1 * Range;
Value5 = (Value1 – Value2) * Range;
Value6 = Value2 * Range;
Value7 = (Value2 – Value1) * Range;
Value8 = IIf (Range != 0, Value1 / Range, 1);
Value9 = IIf (Range != 0, (Value1 – Value2) / Range, 1);
Value10 = IIf (Range != 0, Value2 / Range, 1);
Value11 = IIf (Range != 0, (Value2 – Value1) / Range, 1);
Value12 = IIf (Range != 0, Value3 / Range, 1);
Value13 = IIf (Use2Bars"Yes", Value3 + Ref(Value3,-1),1); Value14 = IIf (Use2Bars“Yes”, (Value1 + Ref(Value1,-1))(HHV-LLV),1);
Value15 = IIf (Use2Bars==“Yes”, (Value1 + Ref(Value1,-1)-Value2-Ref(Value2,-1))(HHV-LLV),1);
Value16 = IIf (Use2Bars"Yes", (Value2 + Ref(Value2,-1))*(HHV(High,2)-LLV(Low,2)),1); Value17 = IIf (Use2Bars “Yes”, (Value2 + Ref(Value2,-1)-Value1-Ref(Value1,-1))(HHV-LLV),1);//IIf (Use2Bars==“Yes”, (Value2 + Ref(Value2,-1)-Value1-Value11)(HHV-LLV),1);
Value18 = IIf ((Use2Bars==“Yes” AND (HHV=LLV)),(Value1+Ref(Value1,-1)-Value2-Ref(Value2,-1))/(HHV-LLV),1);
Value20 = IIf ((Use2Bars==“Yes” AND (HHV=LLV)),(Value2+Ref(Value2,-1)-Value1-Ref(Value1,-1))/(HHV-LLV),1);
Value22 = IIf ((Use2Bars==“Yes” AND (HHV!=LLV)),Value13/(HHV-LLV),1);
Condition1 = IIf(Value3 == LLV, 1, 0);
Condition2 = IIf((Value4 == HHV AND Close > Open), 1, 0);
Condition3 = IIf((Value5 == HHV AND Close > Open), 1, 0);
Condition4 = IIf((Value6 == HHV AND Close < Open), 1, 0);
Condition5 = IIf((Value7 == HHV AND Close < Open), 1, 0);
Condition6 = IIf((Value8 == LLV AND Close < Open), 1, 0);
Condition7 = IIf((Value9 == LLV AND Close < Open), 1, 0);
Condition8 = IIf((Value10 == LLV AND Close > Open), 1, 0);
Condition9 = IIf((Value11 == LLV AND Close > Open), 1, 0);
Condition10 = IIf(Value12 == HHV, 1, 0);
Condition11 = IIf (Use2Bars"Yes" AND (Value13LLV AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0);
Condition12 = IIf (Use2Bars"Yes" AND (Value14HHV AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0);
Condition13 = IIf (Use2Bars"Yes" AND (Value15HHV AND Close > Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition14 = IIf (Use2Bars"Yes" AND (Value16HHV AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition15 = IIf (Use2Bars"Yes" AND (Value17HHV AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition16 = IIf (Use2Bars"Yes" AND (Value18LLV AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition17 = IIf (Use2Bars"Yes" AND (Value19LLV AND Close > Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition18 = IIf (Use2Bars"Yes" AND (Value20LLV AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0);
Condition19 = IIf (Use2Bars"Yes" AND (Value21LLV AND Close > Open AND Ref(Close,-1) > Ref(Open,-1)),1,0);
Condition20 = IIf (Use2Bars"Yes" AND (Value22HHV), 1,0);
Color=
IIf (ClimaxChurn== “Yes” AND (Condition10 OR Condition20) AND (Condition2 OR Condition3 OR Condition4 OR Condition5 OR Condition6 OR Condition7 OR Condition8 OR Condition9),ColorRGB(255,0,255) ,
IIf (LowVol== “Yes” AND (Condition1 OR Condition11) , colorYellow,
IIf (ClimaxUp== “Yes” AND (Condition2 OR Condition3 OR Condition8 OR Condition9 OR Condition12 OR Condition13 OR Condition18 OR Condition19) , colorRed,
IIf (ClimaxDown== “Yes” AND (Condition4 OR condition5 OR Condition6 OR Condition7 OR Condition14 OR Condition15 OR Condition16 OR Condition17) ,colorWhite,
IIf (Churn== “Yes” AND Condition10 OR Condition20,colorGreen,ColorRGB(0,255,255))))));
Plot(Volume, “Vol”,Color,styleHistogram );
Plot(MA, “VolAvg”,colorWhite, styleLine);