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

Great Summary for Amibroker (AFL)
hkeng
over 14 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 13)
Tags:
oscillator, amibroker, alerts

Allow users to track the position of a stock to by how many percent it is from MA lines. Users will also receive BUY and SELL signal from RSI, MFI as well as TRIX indicators.

Screenshots

Similar Indicators / Formulas

Forecast Oscillator
Submitted by milma almost 13 years ago
Debu Market Efficiency Ratio
Submitted by agent301 over 12 years ago
KILL THE OPERATOR MACD
Submitted by prasadmuni over 12 years ago
MACD (new timing)
Submitted by tigernifty over 12 years ago
Better Volume Indicator from ThinkScript
Submitted by vole_00 over 11 years ago
Volume Lines
Submitted by hit2010 over 12 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("MAIN");

Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );

//TRIX
trx=0;
trxh = 0;
periods = Param( "Periods", 15, 1, 200, 1 );
trx=Trix(periods);
trxh=C/100;

/*
//under study
tx=(Trix(3)*Trix(5)*Trix(7))/100;
tm=MA(tx,3);
Ch1=tx - tm;
*/

//RSI
RA=0;
periods = Param( "Periods", 15, 1, 200, 1 );
RA=RSI(periods);

//MFI
Mf=0;
periods = Param( "Periods", 15, 1, 200, 1 );
Mf=MFI(periods);

//get pfe 
pds=10; 
x=sqrt((ROC(C,9)*ROC(C,9))+100);
y=Sum(sqrt((ROC(C,1)* ROC(C,1))+1),pds);
z=(x/y);
pfe=EMA(IIf(C>Ref(C,-9),z,-z)*100,5);



MAWeeklyMacd = Signal(6,13,5);
MACDRoc = maWeeklyMacd - Ref(maWeeklyMacd,-5);

//Cond1 - "V" bottom, NEW UP TREND 
Cond1 = IIf(MACDRoc > Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) <= Ref(MACDRoc,-2),1,0);
//Cond2 - "V" top, NEW DOWN TREND 
Cond2 = IIf(MACDRoc < Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) >= Ref(MACDRoc,-2),1,0);
//cond3 - Trend is Up 
Cond3 = IIf(MACDRoc > Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) >= Ref(MACDRoc,-2),1,0);
//Cond4 - Trend is Down 
Cond4 = IIf(MACDRoc < Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) <= Ref(MACDRoc,-2),1,0);
//Cond5 - Trend is Flat 
Cond5 = IIf(MACDRoc== Ref(MACDRoc,-1) ,1,0);

MAMonthlyMacd = Signal(6,13,26);
MACDRoc = mamonthlyMacd - Ref(mamonthlyMacd,-26);

//Cond1 - "V" bottom, NEW UP TREND 
Cond6 = IIf(MACDRoc > Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) <= Ref(MACDRoc,-2),1,0);
//Cond2 - "V" top, NEW DOWN TREND 
Cond7 = IIf(MACDRoc < Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) >= Ref(MACDRoc,-2),1,0);
//cond3 - Trend is Up 
Cond8 = IIf(MACDRoc > Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) >= Ref(MACDRoc,-2),1,0);
//Cond4 - Trend is Down 
Cond9 = IIf(MACDRoc < Ref(MACDRoc,-1) AND Ref(MACDRoc,-1) <= Ref(MACDRoc,-2),1,0);
//Cond5 - Trend is Flat 
Cond10 = IIf(MACDRoc== Ref(MACDRoc,-1) ,1,0);

//GET SIMPL MOVING AVRAGE OF PERIODS 5,9,14,20,50

T=5; 
KMA1=((C-MA(C,T))/MA(C,T))*100; 
M1=MA(C,T);

T=9; 
KMA2=((C-MA(C,T))/MA(C,T))*100; 
M2=MA(C,T);

T=14; 
KMA3=((C-MA(C,T))/MA(C,T))*100; 
M3=MA(C,T);

T=20; 
KMA4=((C-MA(C,T))/MA(C,T))*100; 
M4=MA(C,T);

T=50; 
KMA5=((C-MA(C,T))/MA(C,T))*100; 
M5=MA(C,T);

//get res and sup
p = (H+L+C)/3;
r1 = (2*p)-L;
s1 = (2*p)-H;
r2 = p +(r1 - s1);
s2 = p -(r2 - s1);
R3 = P + (R2 - S2);
S3 = P - (R3 - S2);

Title=EncodeColor(colorWhite )+Name() +EncodeColor(colorWhite )+ FullName() +EncodeColor(colorWhite)+" [Date : "+EncodeColor(colorWhite)+Date()
+EncodeColor(colorWhite)+

StrFormat("{{INTERVAL}}")+EncodeColor(colorWhite)+"]"+"\n"+

EncodeColor(colorBlue)+"Open:"+EncodeColor(colorWhite)+O+
EncodeColor(colorBlue)+" Close: "+EncodeColor(colorWhite)+C+
EncodeColor(colorBlue)+" High: "+EncodeColor(colorWhite)+H+
EncodeColor(colorBlue)+" Low: "+EncodeColor(colorWhite)+L+
EncodeColor(colorBlue)+" Val:"+EncodeColor(colorWhite)+WriteVal(V,1,0)+"\n"+

EncodeColor(colorRed)+"R1 "+EncodeColor(colorRed)+r1+
EncodeColor(colorRed)+" R2 "+EncodeColor(colorRed)+r2+
EncodeColor(colorRed)+" R3 "+EncodeColor(colorRed)+r3+"\n"+

EncodeColor(colorGreen)+"S1 "+EncodeColor(colorGreen)+s1+
EncodeColor(colorGreen)+" S2 "+EncodeColor(colorGreen)+s2+
EncodeColor(colorGreen)+" S3 "+EncodeColor(colorGreen)+s3+"\n"+

EncodeColor(colorBlue)+WriteVal(abs(KMA1),format=1.2)+"%"+WriteIf(KMA1>0,EncodeColor(colorGreen)+"above MA5p ",EncodeColor(colorRed)+"below MA5p ")+EncodeColor(colorBlue)+M1+"\n"+
EncodeColor(colorBlue)+WriteVal(abs(KMA2),format=1.2)+"%"+WriteIf(KMA2>0,EncodeColor(colorGreen)+"above MA9p ",EncodeColor(colorRed)+"below MA9p ")+EncodeColor(colorBlue)+M2+"\n"+
EncodeColor(colorBlue)+WriteVal(abs(KMA3),format=1.2)+"%"+WriteIf(KMA3>0,EncodeColor(colorGreen)+"above MA14p",EncodeColor(colorRed)+"below MA14p ")+EncodeColor(colorBlue)+M3+"\n"+
EncodeColor(colorBlue)+WriteVal(abs(KMA4),format=1.2)+"%"+WriteIf(KMA4>0,EncodeColor(colorGreen)+"above MA20p",EncodeColor(colorRed)+"below MA20p")+EncodeColor(colorBlue)+M4+"\n"+
EncodeColor(colorBlue)+WriteVal(abs(KMA5),format=1.2)+"%"+WriteIf(KMA5>0,EncodeColor(colorGreen)+"above MA50p",EncodeColor(colorRed)+"below MA50p")+EncodeColor(colorBlue)+M5+"\n"+

EncodeColor(colorDarkBlue)+"RSI indicates "+WriteIf(RA > Ref(RA ,-1) AND RA < 70 AND RA > 30 ,EncodeColor(colorGreen)+" BUY ",WriteIf( RA < Ref(RA ,-1) AND RA < 30 ,EncodeColor(colorRed)+" WATING STRONG BUY ",WriteIf( RA > Ref(RA ,-1) AND RA > 70 ,EncodeColor(colorRed)+" WATING STRONG Sell", EncodeColor(colorRed)+" Sell " )))+
EncodeColor(colorDarkBlue)+WriteIf(RA > 70 OR RA < 30 ,EncodeColor(colorRed)+WriteVal(ra), EncodeColor(colorBlue)+WriteVal(ra))+"\n"+

EncodeColor(colorDarkBlue)+"MFI indicates "+WriteIf(MF > Ref(MF ,-1) AND MF < 80 AND MF > 20 ,EncodeColor(colorGreen)+" BUY ",WriteIf( MF < Ref(MF ,-1) AND MF < 20 ,EncodeColor(colorRed)+" WATING STRONG BUY ",WriteIf( MF > Ref(MF ,-1) AND MF > 80 ,EncodeColor(colorRed)+" WATING STRONG Sell", EncodeColor(colorRed)+" Sell " )))+
EncodeColor(colorDarkBlue)+WriteIf(MF > 80 OR MF < 20 ,EncodeColor(colorRed)+WriteVal(MF), EncodeColor(colorBlue)+WriteVal(MF))+"\n"+

EncodeColor(colorDarkBlue)+"TRIX indicates "+WriteIf(trx > Ref(trx ,-1) AND trx < trxh ,EncodeColor(colorGreen)+" BUY ",WriteIf( trx < Ref(trx ,-1) AND trx < 0 ,EncodeColor(colorRed)+" WATING STRONG BUY ",WriteIf( trx > Ref(trx ,-1) AND trx > trxh ,EncodeColor(colorRed)+" WATING STRONG Sell", EncodeColor(colorRed)+" Sell " )))+
EncodeColor(colorDarkBlue)+WriteIf(trx > trxh OR trx < 0 ,EncodeColor(colorRed)+WriteVal(trx), EncodeColor(colorBlue)+WriteVal(trx))+"\n"+

//EncodeColor(colorDarkBlue)+"MA ( TRIX ) "+WriteIf(CH1 > 0 ,EncodeColor(colorGreen)+" BUY ", EncodeColor(colorRed)+" Sell " )+"\n"+

EncodeColor(colorDarkBlue)+"PFE indicates MAIN TREND = " +WriteIf(pfe>10,EncodeColor(colorGreen)+ " UP TREND ",WriteIf(pfe>-10 AND pfe<10, EncodeColor(colorBlue)+" Consolidation Phase is in place",EncodeColor(colorRed)+ " DOWN TREND "))+"\n"+
EncodeColor(colorDarkBlue)+"PFE indicates CURRENTLY TREND = "+WriteIf(pfe>Ref(pfe,-1),EncodeColor(colorGreen)+" Rising which is Up Trend OR weakening Down Trend", EncodeColor(colorRed)+" falling which is Down trend OR weakening uptrend ")+"\n"+
EncodeColor(colorDarkBlue)+"WEEKLY -" +WriteIf(Cond1==1,EncodeColor(colorGreen)+" NEW UP TREND ", WriteIf(Cond2==1,EncodeColor(colorRed)+" NEW DOWN TREND ", WriteIf(Cond3==1,EncodeColor(colorGreen)+" Trend is Up ",WriteIf(Cond4==1,EncodeColor(colorRed)+" Trend is Down ",WriteIf(Cond5==1,EncodeColor(colorRed)+" Trend is Flat ","")))))+"\n"+
EncodeColor(colorDarkBlue)+"MONTHLY -" +WriteIf(Cond6==1,EncodeColor(colorGreen)+" NEW UP TREND ", WriteIf(Cond7==1,EncodeColor(colorRed)+" NEW DOWN TREND ", WriteIf(Cond8==1,EncodeColor(colorGreen)+" Trend is Up ",WriteIf(Cond9==1,EncodeColor(colorRed)+" Trend is Down ",WriteIf(Cond10==1,EncodeColor(colorRed)+" Trend is Flat ","")))));


_SECTION_END();

_SECTION_BEGIN("BUY&SELL=SIGNAL");

k=1; /* factor de multiplicare*/

/*R rezistenta pentru ziua curenta*/
R = Ref(Close, -1)+k*Ref(ATR(10),-1); 
/*S rezistenta pentru ziua curenta*/ 
S = Ref(Close, -1)-k*Ref(ATR(10),-1);

Buy=Close>R;
Sell=Close<S;

Cump=IIf(Close>R,1,0);
Vanz=IIf(Close<S,1,0);

Plot(Close,"Close",colorBlack,styleCandle);
//Plot(R, "Res",colorGreen,styleDots);
//Plot(S, "Sup:",colorRed,styleDots);


Buy = ExRem( Buy, Sell ); //Elimina semnalele buy consecutive
Sell = ExRem( Sell, Buy ); //Elimina semnalele sell consecutive

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;

fig=Cump*shapeHollowUpArrow + Vanz*shapeHollowDownArrow;

PlotShapes( fig, IIf( Cump, colorGreen , colorRed), 0, IIf( Cump, Low-2, High+2)); //Pentru a vizualiza semnalele consecutive eliminate de ExRem
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low-2, High+2)); 

AlertIf( Buy, "", "ATR 10-1 Sistem", 1 );
AlertIf( Sell, "", "ATR 10-1 Sistem",2);

GraphXSpace = 3;

_SECTION_END();

_SECTION_BEGIN("Volume At Price");
PlotVAPOverlay( Param("Lines", 300, 100, 1000, 1 ), Param("Width", 5, 1, 100, 1 ), ParamColor("Color", colorCycle ), ParamToggle("Side", "Left|Right" ) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
 
_SECTION_END();

3 comments

1. sam_u6

very usefull

2. LGC

Thanks, very nice.

3. mamunbaf9117

Very Good……Liked a lot. Thnx

Leave Comment

Please login here to leave a comment.

Back