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 ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Volatility Ratio for Amibroker (AFL)
Rating:
3 / 5 (Votes 4)
Tags:
amibroker
Indicator / Formula
Copy & Paste Friendly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | // 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