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

Auto Fib-R for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
fibonacci, amibroker

This indicator automatically plot the Fibonacci retracement levels with a single click on the price chart. Only the critical levels of 38.2%, 50% and 61.8% are shown.

Screenshots

Similar Indicators / Formulas

Auto retracment
Submitted by gaurav918 over 13 years ago
Automatic Fibonacci Levels
Submitted by kaiji over 15 years ago
Automatic Fibonacci
Submitted by ngocleasing about 15 years ago
Fibonacci High-Probability Zones
Submitted by jayman2005 about 12 years ago
fibonacci extension updown
Submitted by vijaybaroda about 12 years ago

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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
_SECTION_BEGIN("Background");
SetChartBkGradientFill( ParamColor("BgTop", colorLightGrey),ParamColor("BgBottom", colorLightYellow));
 
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) )));
 
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
 ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:   %g\nClose:  %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
};
 
 
 
//Plot( C, "", IIf(Close > Open, colorGreen, colorRed), styleCandle + styleNoLabel);
_SECTION_END();
 
_SECTION_BEGIN("Moving Average");
 
x=Param("EMA 1",20,1,200,1);
y=Param("EMA 2", 50,1,200,1);
z=Param("EMA 3",100,1,200,1);
zz=Param("EMA 4",200,1,200,1);
EMA20= EMA(C,x);
EMA50=EMA(C,y);
EMA100= EMA(C,z);
EMA200=EMA(C,zz);
 
Plot (EMA (C,x), "EMA 20", ParamColor("EMA20",colorRed), styleDots+styleThick+styleNoLine+styleNoLabel,maskAll);
Plot (EMA (C,y), "EMA 50", ParamColor("EMA50",colorBlue), styleDots+styleThick+styleNoLine+styleNoLabel,maskAll);
Plot (EMA (C,z), "EMA 100", ParamColor("EMA100",colorGold), styleDots+styleThick+styleNoLine+styleNoLabel,maskAll);
Plot (EMA (C,zz), "EMA 200", ParamColor("EMA200",colorDarkGrey), styleDots+styleThick+styleNoLine+styleNoLabel,maskAll);
 
SUT=EMA(C,5)>EMA20;
SDT=EMA20>EMA(C,5);
mut= EMA20>EMA50;
mdt=EMA20<EMA50;
_SECTION_END();
_SECTION_BEGIN("Mid Term Price Trend");
 
 
MPT = IIf( mut, colorGreen, IIf( mdt, colorRed, colorYellow));
Plot( 3, "", MPT, styleArea|styleOwnScale|styleNoLabel, 0, 100);
 
_SECTION_END();
 
_SECTION_BEGIN("Short Term Price Trend");
 
SPT = IIf( EMA(C,5)>EMA20, colorBrightGreen, IIf( EMA20>EMA(C,5), colorPink, colorYellow));
Plot( 6, "", SPT, styleArea|styleOwnScale|styleNoLabel, 0, 100);
 
_SECTION_END();
 
 
 
//StochRSI Signal
R= 14;
S = 14;
 
Value1 = RSI( R );
SR=100*(Value1-LLV(Value1,S))/(HHV(Value1,S)-LLV(Value1,S));
SR1=Ref(SR,-1);
 
sup=(SR1<20 AND SR>=20 AND sr<80) AND SUT;
sdown=(SR1>80 AND SR<=80 AND sr>20) AND SDT;
mup=(SR1<20 AND SR>=20 AND sr<80) AND mut;
mdown=(SR1>80 AND SR<=80 AND sr>20) AND mdt;
 
PlotShapes(
        IIf(sup==1, shapeUpArrow, shapeNone),
            colorSkyblue, 0,    High, Offset=-35);
 
 
PlotShapes(
        IIf(sdown==1, shapeDownArrow, shapeNone),
            colorPink, 0,   High, Offset=-15);
 
PlotShapes(
        IIf(mup==1, shapeUpArrow, shapeNone),
            colorGreen, 0,  High, Offset=-45);
 
 
PlotShapes(
        IIf(mdown==1, shapeDownArrow, shapeNone),
            colorRed, 0,    High, Offset=-25);
 
 
 
_SECTION_BEGIN("Fib-R");
 
 
// Get values for fib-R
 
StartBar=SelectedValue(BarIndex());
FinishBar = EndValue( BarIndex() );
i = startbar;
period = FinishBar - StartBar;
 
Lo =LLV(L,period);
Hi = HHV(H,period);
Line0 = 0;
Line1 = 0;
Line2 = 0;
Line3 = 0;
Line4= 0;
Line5=0;
Line100 = 0;
 
for( i = startbar; i < finishbar; i++ )
{
if(EndValue(C)<SelectedValue(C))
{
Line0  = EndValue(Lo);
Line100 = EndValue(Hi);
Line1 = Line0 + abs(Line100-Line0)*0.236;
Line2 = Line0 + abs(Line100-Line0)*0.382;
Line3 = Line0 + abs(Line100-Line0)*0.5;
Line4 = Line0 + abs(Line100-Line0)*0.618;
Line5 = Line0 + abs(Line100-Line0)*0.768;
}
else
{
Line100  = EndValue(Lo);
Line0 = EndValue(Hi);
Line1 =Line0 - abs(Line100-Line0)*0.236;
Line2 = Line0 - abs(Line100-Line0)*0.382;
Line3 = Line0 - abs(Line100-Line0)*0.5;
Line4 = Line0 - abs(Line100-Line0)*0.618;
Line5 = Line0 - abs(Line100-Line0)*0.768;
}
}
 
// external fib lines begining fom selecetdbarindex()
fib0= LineArray(startbar, Line0, finishbar, Line0, 0, 1);
fib100 = LineArray(startbar, Line100, finishbar, Line100, 0, 1);
 
// depth of middle lines
n= round((finishbar-startbar)/2);
 
// middle lines
fib1= LineArray((finishbar-n), Line1, finishbar, Line1, 0, 1);
fib2= LineArray((finishbar-n), Line2, finishbar, Line2, 0, 1);
fib3= LineArray((finishbar-n), Line3, finishbar, Line3, 0, 1);
fib4= LineArray((finishbar-n), Line4, finishbar, Line4, 0, 1);
fib5= LineArray((finishbar-n), Line5, finishbar, Line5, 0, 1);
 
Plot(fib0,"", colorBlack, styleNoLabel);
Plot(fib100,"", colorBlack, styleNoLabel);
//Plot(fib1,"23.6%", colorYellow+styleNoLine+styleDots);
Plot(fib2,"38.2%", ParamColor("38.2% Color",colorGreen),ParamStyle("38.2% Style",styleLine+styleThick, maskAll ));
Plot(fib3,"50%", ParamColor("50% Color",colorGreen),ParamStyle("50% Style",styleLine+styleThick, maskAll ));
Plot(fib4,"61.8%", ParamColor("61.8% Color",colorAqua),ParamStyle("61.8% Style",styleThick+styleNoLine+styleDots, maskAll ));
 
//Plot(fib5,"76.8%", colorGold,styleLine);
 
Title = Name() + "  -  " +FullName()+" -  AUTO FIB-R " + "  -  RedLine = " + WriteVal(EMA20,0.3)+ "  -  BlueLine = " + WriteVal(EMA50,0.3)+ "  -  Yellowline = " + WriteVal(EMA100,0.3)+ "  -  BlackLine = " + WriteVal(EMA200,0.3);
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back