Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Better Volume Indicator for Amibroker (AFL)
kaiji
almost 15 years ago
Amibroker (AFL)

Rating:
4 / 5 (Votes 5)
Tags:
amibroker, volume

This is a conversion of the Tradestation code of the better volume indicator. For more information visit this website here

Similar Indicators / Formulas

New V spiker Moded-1.50
Submitted by Kutubi over 13 years ago
Smoothed OBV
Submitted by magic over 14 years ago
Volume Scan report
Submitted by anandnst over 12 years ago
market thermometer
Submitted by titus over 14 years ago
Volume - compared with Moving Avg (100%)
Submitted by kaiji almost 15 years ago
Volume Color with Dynamic Limit
Submitted by kaiji almost 15 years ago

Indicator / Formula

Copy & Paste Friendly
SetChartBkColor(16 ) ;

_SECTION_BEGIN("EMA");
P = Volume;
Periods = Param("PeriodsEMA", 9, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), colorRed, styleLine | styleThick );
_SECTION_END();

Period = Param("Period", 10, 2, 300, 1, 10 );;
LowColor = colorYellow;
ClimaxColor = colorRed;
ChurnColor = colorGreen;
ClimaxChurnColor=colorBlue;
LowChurnColor= colorWhite;

Value1 = V;
Value2 = V*(H-L);
Value3 = V/(H-L);

BarColor = IIf( (Value1 == LLV(Value1,Period)), LowColor,

IIf( (Value2 == HHV(Value2,Period)), ClimaxColor,

IIf( (Value3 == HHV(Value3,Period)), ChurnColor,

IIf( ((Value2 == HHV(Value2,Period) AND (Value3 == HHV(Value3,Period)))), ClimaxChurnColor,

IIf( (Value3 == LLV(Value3,Period)), LowChurnColor, colorBlueGrey)))));

_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), BarColor, ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ), 2 );
_SECTION_END();

1 comments

1. prashantgawande

Latest code -

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)/(2*Range+C-O))*V);//IIf (Close > Open,Volume * ((Range) / ((2+(Range*Range)/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(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-Ref(Value1,-1))*(HHV(High,2)-LLV(Low,2)),1);//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==HHV(Value16,Lookback) AND Close < Open AND Ref(Close,-1) < Ref(Open,-1)),1,0);
Condition15 = IIf (Use2Bars=="Yes" AND (Value17==HHV(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==HHV(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),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(Volume, lookback), "VolAvg",colorWhite, styleLine);

Leave Comment

Please login here to leave a comment.

Back