Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Open Interest with Exploration for Amibroker (AFL)
Displays open interest data of current month.
It can explore based on OI filters.
Screenshots
Indicator / Formula
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 47 48 49 | //Author : Ashok Kumar Yadala //Credits to all authors , code adopted from open source authors and modified as per real time needs! _SECTION_BEGIN ( "Total OI" ); Symbol1OI_Vege= Foreign ( Name (), "I" ); V1 = Ref ( V ,-1);C1 = Ref ( C ,-1); oi1 = Ref (OI,-1); vol_up = V >V1; price_up = C >C1; oi_up = OI>OI1; vol_dn = V <V1; price_dn = C <C1; oi_dn = OI<OI1; ROChag = ROC (Symbol1OI_Vege,1); long_buildup = price_up AND vol_up AND oi_up; short_buildup = price_dn AND vol_up AND oi_up; long_unwinding = price_up AND vol_dn AND oi_dn; short_covering = price_dn AND vol_dn AND oi_dn; trendSTATUS = WriteIf (long_buildup, "long_buildup" , WriteIf (short_buildup, "short_buildup" , WriteIf (long_unwinding, "long_unwinding" , WriteIf (short_covering, "short_covering" , " " )))); trendCOLOR = IIf (long_buildup, colorGreen , IIf (short_buildup, colorRed , IIf (long_unwinding, colorOrange , IIf (short_covering, colorLightBlue , colorWhite )))); Plot (Symbol1OI_Vege , " Current Month OI" ,trendCOLOR , styleHistogram ); Title = Name () + " - " + Date () + ", " + " Open=" + WriteVal ( O ,1.0)+ ", " + " High=" + WriteVal ( H ,1.0)+ ", " + " Low=" + WriteVal ( L ,1.0)+ ", " + " Close=" + WriteVal ( C ,1.0) + ", " + " OI=" + WriteVal (OI,1.0)+ ", " + " OI% Chg=" + WriteVal (ROChag,1.0); Long = (price_up AND oi_up AND C1> Ref (C1,-1) AND oi1 > Ref (oi1 ,-1)); Short = ( price_dn AND oi_up AND C1< Ref (C1,-1) AND oi1 < Ref (oi1 ,-1)); Filter = Long OR Short ; AddColumn ( C , "Close" ,1.2); AddTextColumn (trendSTATUS, "OI Status" ,1, colorBlack , trendCOLOR,width=110); AddColumn ( C , "Close" ,1, IIf ( C > Ref ( C ,-1), colorGreen , colorRed )); AddColumn ( ROC ( C ,1), "% Price change" ,1.2); AddColumn (Symbol1OI_Vege, "open interest" ,1, IIf (Symbol1OI_Vege> Ref (Symbol1OI_Vege,-1), colorGreen , colorRed )); AddColumn ( ROC (Symbol1OI_Vege,1), "% OI change" ,1.2); SetSortColumns ( -7,-8); _SECTION_END (); |
3 comments
Leave Comment
Please login here to leave a comment.
Back
Sample
why do you use Symbol1OI_Vege=Foreign(Name(),āIā) instead of Symbol1OI_Vege=OI ?
bug:
long_unwinding : price should be down
short_covering : price should be up
My bad: code is fine..