Long Termtrade - Target Line for Amibroker (AFL)
/* Arka Plan Parametre */
_SECTION_BEGIN("Background");
SetChartOptions(0,chartShowArrows|chartShowDates);
GraphXSpace=Param("grafik genislet",15,-100,300,1);
SetChartBkColor(ParamColor("Outer panel color ",colorwhite)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel color upper half",colorwhite),
ParamColor("Inner panel color lower half",colorWhite),ParamColor("behind Text Color", colorwhite));
Plot(C,"Kapanis",colorBlack,styleCandle);
GfxSelectFont("Arial Bold", Status("pxheight")/20);
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ParamColor("Text Color", ColorHSB( 40, 40, 40 ) ));
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/10);
/*CROSS-Ortlamalarin YUKARI Kesismesi*/
kesisme=Cross(EMA(C,270),EMA(C,360));
Akesisme=Cross(EMA(C,360),EMA(C,270));
/* #1453fatihsystem ortlamalari */
Plot(EMA(C,60),"üstü kuvvetli",colorred,styleThick);
Plot(EMA(C,90),"",colorRose,styleLine);
Plot(EMA(C,180),"",colorLightOrange,styleLine);
Plot(EMA(C,270),"",colorGrey40,styleLine);
Plot(EMA(C,360),"destek seviye",colorBlue,styleThick);
/* HAFTALIK 360 EMA */
wc = TimeFrameCompress( Close, inWeekly );
weeklyma1 = eMA( wc, 360 );
weeklyma1 = TimeFrameExpand( weeklyma1, inWeekly );
Plot( weeklyma1, "", colorGreen,styledashed );
mc = TimeFrameCompress( Close, inmonthly );
/* AYLIK 150 EMA */
monthlyma1 = eMA( mc, 150 );
monthlyma1 = TimeFrameExpand( monthlyma1, inmonthly);
Plot( monthlyma1, "", colorred,styledashed );
/* kesisme , hedef1 ,hedef2 yatay çizimi */
Plot(ValueWhen(kesisme,EMA(C,360))*2,"SHDF-1",colorGreen,styleLine);
Plot(ValueWhen(kesisme,EMA(C,360))*3,"SHDF-2",colorGreen,styleLine);
Plot(ValueWhen(kesisme,EMA(C,360)),"POZITIF CROSS ",colorBlue,styleThick);
Plot(ValueWhen(Akesisme,EMA(C,360)),"NEGATIF CROSS ",colorRed,styleThick);
/* ALT BAR NEGATIF ALAN POZITIF ALAN GOSTERIMI */
Color = IIf( EMA(C,270) > EMA(C,360) , colorLime, IIf( EMA(C,360) > EMA(C,270), colorred, colorGrey40 )) ;
Plot( 2, "", Color, styleArea | styleOwnScale | styleNoLabel, -1.1, 50 );
/* ALT BAR SIRALI ORTLAMA GOSTERIMI */
Color = IIf( EMA(C,60) > EMA(C,90) AND EMA(C,90) > EMA(C,180) AND EMA(C,180) > EMA(C,270) AND EMA(C,270) > EMA(C,360) , colorCustom12 ,
IIf( EMA(C,360) > EMA(C,270) AND EMA(C,270) > EMA(C,180) AND EMA(C,180) > EMA(C,90) AND EMA(C,90) > EMA(C,60) , coloraqua, colorGREY40 )) ;
Plot( 2, "", Color, styleArea | styleOwnScale | styleNoLabel, -0.1, 100);
/* uzun vadeli girenleri tarama */
Buy=Cross(EMA(C,270),EMA(C,360));
Sell=Cross(EMA(C,360),EMA(C,270));