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

ELLIOT WAVE WITH SAR for Amibroker (AFL)
ajit_2682
almost 13 years ago
Amibroker (AFL)

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

I COMBINE TWO FORMULA ELLIOT WAVE WITH SAR. SEE AND RUN ON TRIAL

Similar Indicators / Formulas

Volume Trade with Candle reader
Submitted by Divyesh over 11 years ago
Head & Shoulders Pattern
Submitted by anandnst over 13 years ago
Modified Head & Shoulder Pattern
Submitted by huynhbao2 over 13 years ago
Cup Formation
Submitted by vargasc1 over 13 years ago
Andrews Pitchfork v3.3
Submitted by kaiji almost 15 years ago
Schiff Lines
Submitted by kaiji over 14 years ago

Indicator / Formula

Copy & Paste Friendly
// Supertrend - Translated from Kolier MQ4
// see: http://kolier.li/indicator/kolier-supertrend-indi
// translation in Amibroker AFL code by E.M.Pottasch, 2011
 
procedure calcTrend_proc(ATR_Period,tr,ATR_Multiplier,TrendMode,CalcPrice)
{
global buffer_line_down;
global buffer_line_up;
buffer_line_down = Null;
buffer_line_up = Null;
 
PHASE_NONE = 0;
PHASE_BUY = 1;
PHASE_SELL = -1;
 
phase=PHASE_NONE;
band_upper = 0;band_lower = 0;
   
for(i = ATR_Period + 1; i < BarCount; i++)
{
    band_upper = CalcPrice[i] + ATR_Multiplier * tr[i];
    band_lower = CalcPrice[i] - ATR_Multiplier * tr[i];
     
    if(phase==PHASE_NONE)
    {
        buffer_line_up[i] = CalcPrice[i];
        buffer_line_down[i] = CalcPrice[i];
    }
    if(phase!=PHASE_BUY && Close[i]>buffer_line_down[i-1] && !IsEmpty(buffer_line_down[i-1])) 
    {
        phase = PHASE_BUY;
        buffer_line_up[i] = band_lower;
        buffer_line_up[i-1] = buffer_line_down[i-1];
    }
    if(phase!=PHASE_SELL && Close[i]<buffer_line_up[i-1] && !IsEmpty(buffer_line_up[i-1]))
    {
        phase = PHASE_SELL;
        buffer_line_down[i] = band_upper;
        buffer_line_down[i-1] = buffer_line_up[i-1];
    }   
    if(phase==PHASE_BUY && ((TrendMode==0 && !IsEmpty(buffer_line_up[i-2])) || TrendMode==1) )
    {
        if(band_lower>buffer_line_up[i-1]) 
        {
            buffer_line_up[i] = band_lower;
        }
        else
        {
            buffer_line_up[i] = buffer_line_up[i-1];
        }
    }
    if(phase==PHASE_SELL && ((TrendMode==0 && !IsEmpty(buffer_line_down[i-2])) || TrendMode==1) )
    {
        if(band_upper<buffer_line_down[i-1])
        {
            buffer_line_down[i] = band_upper;
        }
        else
        {
            buffer_line_down[i] = buffer_line_down[i-1];
        }
    }
}
}
 
SetBarsRequired(sbrAll,sbrAll);
 
TrendMode = ParamToggle("TrendMode","Off|On",1);
ATR_Multiplier = Param("ATR_Multiplier",2,0.1,10,0.1);
ATR_Period = Param( "ATR_Period",5,1,20,1);
tr = ATR(ATR_Period);
 
CalcPrice = (H+L)/2;
calcTrend_proc(ATR_Period,tr,ATR_Multiplier,TrendMode,CalcPrice);
 
SetChartOptions(0,chartShowDates);
Plot(C,"C",colorWhite,64);
Plot(buffer_line_up,"\ntu",ColorRGB(28,134,238),styleThick);
Plot(buffer_line_down,"\ntd",ColorRGB(205,51,51),styleThick);
 
Plot( 2,"",IIf(buffer_line_up,colorGreen,colorBlack),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
Plot( 4,"",IIf(buffer_line_down,colorRed,colorBlack),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_BEGIN("Advanced Elliot Wave ");
//Elliot Wave Metastock to AFL
//-- Script Start -------
_N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: "+_DEFAULT_NAME()+" : {{VALUES}} "
);
 
Option = ParamToggle("Insert To", "Price Chart|Indicator");
pr=Param("Elliot Wave minimum % move",0.5, 0.25,3,0.25);
//{ Beginner Elliot Wave stuff }
EWpk=PeakBars(H,pr)==0;
EWtr=TroughBars(L,pr)==0;
//{ Intermediate Elliot Wave stuff }
zz=Zig(C,pr);
zzHi=Zig(H,pr);
zzLo=Zig(L,pr);
Avg=(zzHi+zzLo)/2;
//{ Advanced Elliot Wave stuff }
RetroSuccessSecret=IIf(EWpk,zzHi,
IIf(EWtr,zzLo,IIf(Avg>Ref(Avg,-1),H,L)));
EW=Zig(RetroSuccessSecret,pr);
//{ Plot on price chart }
if (Option==0)
Plot(EW, "EW", ParamColor("Color", colorBrown), ParamStyle("Style", styleNoLabel|styleThick));
else
{
//{ Plot on own window }
Plot(EWbuy-EWsell, "EW2", ParamColor("Color", colorRed), ParamStyle("Style", styleNoLabel|styleThick));
}
//{ Buy/Sell Elliot Wave stuff }
EWbuy=TroughBars(EW,pr)==1;
EWsell=PeakBars(EW,pr)==1;
Plot(C,"",47,128+4);
PlotShapes(EWbuy*shapeUpArrow,5,0,L,-5);
PlotShapes(EWsell*shapeDownArrow,4,0,H,-5);
//-- Script End -------
_SECTION_END();

14 comments

1. extremist

Tht Koiler thing …! really great.
nice find .
and never the less nice share.

thanx!

2. yo123

Dangerous to use practically , run it and check it .

3. hotaro3
This formula can be useful in this condition for daily market

ATR Multiplier = 1.4 and ATR Period = 20 and finaly mu must change the range of Elliot wave up to 5 instead of 3 in the program. in this condition Elliot wave is in very good agreement with price fluctuation so it can be used for price prediction
Ahmad

4. hotaro3
This formula can be useful in this condition for daily market

ATR Multiplier = 1.4 and ATR Period = 20 and finaly you must change the range of Elliot wave up to 5 instead of 3 in the program. in this condition Elliot wave is in very good agreement with price fluctuation so it can be used for price prediction
Ahmad

5. yo123

How to turn ATR to 5 when max it goes to 3 ?

6. yo123

With changing the setup still pathetic , cannot be used practically to trade , different views are invited with solutions :).

7. rajivulla

is it shows buy sell signals on real time r it shows buy when price gone up and sell when price already down?

8. hotaro3

chang ATR rang by changing 3 to 5 in line
pr=Param(“Elliot Wave minimum % move”,0.5, 0.25,3,0.25);
with mentioned setting you will have very good agreement between top and down points in price with this indicator. it is as good as Lakshimi indicator. In real trading I dont know it is a predicting or following price indicator but I am working on it
Ahmad

9. extremist

this formula looks in to the future. but as i appriciated first at the start if we use it in combination with other indicators it is really good….!

and for trading we don’t really base our trading system on only one indicator i guess……..

so do some study and u will find ur own system.

for help we all r here….

including admin…..
thanx

10. ajit_2682

ALL SIR AS AM JUNIOR HERE I AHVE NO KNOWLEDGE OF AMIROKER PROGRAMMING I JUST CLUB TWO FORMULA ONE ELLIOT WAVE METASTOCK FOR AMIBROKER AND OTHER IS ATR LINE. AND JUST IT IS PRACTICAL. MY REQUEST TO ALL U PLS MODIFY IT IF POSSIBLE FOR BETTER RESULT .FOR ALL OF US
TANX

AJIT

11. hezar dastan

ELLIOT WAVE WITH SAR is very good

12. PravSu

Hi, I find that there is an error being thrown at this line..
SetBarsRequired(sbrAll,sbrAll);

The error is Error 29. Variable ‘sbrall’ used without having been initialized.

Commenting out this the code works.
Also, I am not clear where this is being used and for what.
Could someone throw some light on the same?
Thanx,
PravSu

13. deep_pocket

working…very nice..
thanks

deep_pocket

14. Ram23

Working. Thanks.

Leave Comment

Please login here to leave a comment.

Back