PM1 = Param("MA1",7.5,1,1500,1);
PM2 = Param("MA2",11,1,1500,1);
M1 = Wilders(Close,PM1);
M2 = Wilders(Close,PM2);
A = Cross(M1,M2);
B = Cross(M2,M1);
Hor1=Param(" LEFT/RIGHT",1,1,1660,1);
Ver1=Param(" UP DOWN",35,1,830,1);
FS1=Param(" Font Size",15,11,100,1);
GfxSelectFont("Tahoma", FS1, 200 );
GfxSetBkColor(colorBlack);
GfxSetTextColor(colorGold);
//GfxTextOut("EMA "+ PM1 + " "+ Prec(M1,2),Hor1,Ver1);
GfxSetTextColor(colorGreen);
//GfxTextOut("EMA "+ PM2 + " "+ Prec(M2,2),Hor1,Ver1+25);
Plot(M1," EMA: "+pm1,ParamColor("FAST EMA COLOR",colorBrightGreen));
Plot(M2," EMA: "+pm2,ParamColor("SLOW EMA COLOR",colorRed));
PlotShapes(IIf(A,shapeUpArrow,shapeNone),colorBrightGreen,0,L,Offset= -30);
PlotShapes(IIf(B,shapeDownArrow,shapeNone),colorRed,0,H,Offset = -30);
Filter = (A == 1) OR (B == 1);
AddColumn(A,"BUY/SELL",1,IIf(A,colorGreen,colorRed),colorWhite);
AddColumn(C,"CLOSE",1.2,colorGreen,colorWhite);
AddColumn(M1," EMA: "+PM1,1.2,ParamColor("FAST EMA COLOR",colorGreen),colorWhite);
AddColumn(M2," EMA: "+PM2,1.2,ParamColor("SLOW EMA COLOR",colorRed),colorWhite);
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
// Copyright www.stockmaniacs.net
// Sigma
Var1=EMA((Close-Ref(Close,-5))/Ref(Close,-5),5);
Var2=EMA((Close-Ref(Close,-20))/Ref(Close,-20),3);
Var3=EMA((Close-Ref(Close,-30))/Ref(Close,-30),3);
G1= EMA(Var1,5);
G2= EMA(Var2,20);
G3= EMA(Var3,30);
/* Chandelier Exit */
period = Param("Period", 13, 1, 240, 1);
mult = Param("Multiplier", 1.7, 1, 240, 0.1);
f=ATR(period);
VS[0] = Close[0];
trend[0] = 0;
HighC[0]=0;
Lowc[0]=0;
for( i = period+1; i < BarCount; i++ )
{
vs[i] = vs[i-1];
trend[i] = trend[i-1];
highC[i] = HighC[i-1];
lowc[i] = lowc[i-1];
if ((trend[i]>=0) && ( C[i] <VS[i] ))
{
trend[i] =-1;
HighC[i] = C[i];
lowc[i] = C[i];
}
if ((trend[i]<=0) && (C[i] >VS[i]))
{
trend[i]=1;
HighC[i] = C[i];
lowc[i] = C[i];
}
if (trend[i]==-1)
{
if (C[i]<lowc[i]) lowc[i] = C[i];
VS[i]= lowc[i]+ (mult*f[i]);
}
if (trend[i]==1)
{
if (C[i]>HighC[i]) HighC[i] = C[i];
VS[i]= HighC[i]-(mult*f[i]);
}
}
Plot(VS, "Vol Stop",IIf(trend==1,10,11 ),styleThick);
mkol = IIf( Trend==1, 10, 11);
Plot(5, "ribbon", mkol, styleOwnScale|styleArea|styleNoLabel, 0, -5); // Weekly trend
acc = Param("Acceleration", 0.01, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.1, 0, 1, 0.001 );
myColor = IIf (C > SAR( acc, accm ) , colorBlue , colorRed);
Plot( SAR( acc, accm ), _DEFAULT_NAME(), myColor , ParamStyle("Style", styleDots | styleNoLine, maskDefault | styleDots | styleNoLine ) );
Title = EncodeColor(colorWhite)+ "Trend Blaster Free - Price Panel - By www.stockmaniacs.net " + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorBlue) +
" - " + Date() +" - "+"\n" +EncodeColor(colorGold) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+
"Cl-"+C+" "+ "Vol= "+ WriteVal(V) +" "+"Trail SL= " +VS+" "+"SAR= " + SAR(acc,accm);
_SECTION_END();
Comments
Post a Comment