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

Volatility Ratio for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
amibroker
The volatility ratio is a technical measure used to identify price patterns and breakouts.

Indicator / Formula

Copy & Paste Friendly
// xac dinh day
WVF = (HHV (Close,22) - Low)/(HHV(Close,22))*100;
Buy=WVF>16;
PlotShapes( shapeSmallUpTriangle * Buy,  colorAqua );


_SECTION_BEGIN("Volatility Ratio");

n=Param("Periods",13,1,300,1);
VRT=Param("VRthreshold",0.55,0.5,1,0.1);
Dday =Param("Decision Day Based on Prev day returns",4,3,5,1);
zero=10^-10;

r1=H-L;
r2=abs(H-Ref(C,-1));
r3=abs(Ref(C,-1)-L);


TrueRange=Max(Max(r1,r2),r3);

TrueHighPds=Max(HHV(H,n),Ref(C,-n));
TrueLowPds=Min(LLV(L,n),Ref(C,-n));
TrueRangePds=TrueHighPds-TrueLowPds;

VolatilityRatio=TrueRange/Max(TrueRangePds,zero);

SetPositionSize(1,spsShares);

decisionSell=HHV(C,5)-C;
decisionBuy=C-LLV(C,5);

Buy =decisionBuy>0 AND Cross(VolatilityRatio,VRT);
PlotShapes( shapeSmallUpTriangle * Buy,  colorGreen );

Sell =0;
Short=decisionSell>0 AND Cross(VolatilityRatio,VRT);
PlotShapes( shapeSmallDownTriangle * Short, colorRed  );

Cover=0;

Plot(VolatilityRatio,"Volatility Ratio - Schwager",colorRed);
Plot(VRT,"VRT - Schwager",colorWhite);

AddColumn(VolatilityRatio,"VolatilityRatio");

_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back