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 ....
Demand Index for Amibroker (AFL)
Copy & Paste Friendly
Back
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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | _SECTION_BEGIN ( "Demand Index" ); /* Demand Index */ /* www.adwin.com.vn */ /* Loc tin hieu - chuyen ma tu MT4*/ GraphMax=9; A=( H + L +2* C ); B= EMA (( HHV ( H ,2)- LLV ( L ,2)),19); BuyP= /*{Khu vuc mua}*/ V / EMA ( V ,19) * ((A>= Ref (A,-1)) +(A< Ref (A,-1)) / exp ((0.375 * (A+ Ref (A,-1)) /B ) *( Ref (A,-1)-A) / A)); SellP = /*{Khu vuc ban}*/ V / EMA ( V ,19) * ((A<= Ref (A,-1)) + (A> Ref (A,-1)) / exp ((0.375 * (A+ Ref (A,-1)) / B ) * (A- Ref (A,-1)) / Ref (A,-1))); mabp= EMA (BuyP,19); masp= EMA (SellP,19); /*{Lam tron diem nhan}*/ divsor= IIf (mabp>masp,mabp,masp); /*{BP:SP ratio}*/ divend= IIf (mabp<masp,mabp,masp); /*{biggest=divisor}*/ var2=1-(divend/divsor); /*{adjust ratio to plot in}*/ var3= IIf ( (masp>mabp) , -var2 , var2 ) ; /*{range -100 to 100}*/ var4=var3*100; Graph1 = var4; Graph1Style=5; Graph1Color=6; var5= MA (var4,30); Graph2=var5;; Graph2Style=5; Graph2Color=4; /* duo`ng Zero Line */ Graph0=0; Graph0Color=2; /* Mua khi var4 ca´t var 5, ba´n khi var 4 ca´t dg zero*/ Buy = Cross (var4,var5); Sell = Cross (0,var4); Buy = ExRem ( Buy , Sell ); Sell = ExRem ( Sell , Buy ); Short = Sell ; Cover = Buy ; Filter = ( Buy == 1 OR Sell == 1) ; NumColumns = 7; Column0 = IIf ( Buy == 1, 1, IIf ( Sell == 1, -1, 0 ) ); Column0Format = 1.0; Column0Name = "B/S" ; Column1 = C ; Column1Name = "Close " ; Column1Format = 1.2; Column2 = MA ( V ,17); Column2Name = "17 Ma Vol " ; Column2Format = 1.0; Column3 = MA ( C ,17)/ MA ( C ,50); Column3Name = "% 17/50 " ; Column3Format = 1.2; Column3Format = 1.2; Column4= MA ( C ,17); Column4Name= "17 C ma" ; Column4Format = 1.2; Column4= MA ( C ,50); Column4Name= "50 C ma" ; Column4Format = 1.2; Column5= ROC (var4,2); Column5Name= "ROC DI" ; Column5Format=1.2; Column6= Cum (1); Column6Name = "#Bars" ; Column6Format = 1.0; Title= "Cung Cau cua TT : giao dich khi duong Blue cat duong red" ; _SECTION_END (); |