Rts trading system for amibroker

vsreeram77

Active Member
#1
hi friends

i am seeing many people selling RTS trading system in different appearences, can anybody put the afl in this forum... ? people sell from 1000 rs to 5000 rs per month with different appearences
 

Rish

Well-Known Member
#4
dear, it is very similar like this

many persons selling at different prices... i will give link also
==========
This is the Code....(I am not using this AFL for my trade...so..you have to understand and do it...don't ask me any questions...i may not able to answer..)
===================


_SECTION_BEGIN("Graphics");
GrpPrm=Param("Graphic Space",1,0,10);
GraphXSpace=GrpPrm;
_SECTION_END();

_SECTION_BEGIN("channels");
//Pattern Recognition graph
//with shading
/*TRENDLINES BREAKOUT*/


x = Cum(1);
per = Param("Percent",3,1,5,1);
s1=L;
s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt= LastValue(ValueWhen( pS, x, 1 ));
startt=LastValue(ValueWhen( pS, x, 2 ));
endS = LastValue(ValueWhen( pS, s1, 1 ) );
startS = LastValue( ValueWhen( pS, s1, 2 ));
dtS =endt-startt;
aS = (endS-startS)/dtS;
bS = endS;
trendlineS = aS * ( x -endt ) + bS;

pR = PeakBars( s11, per, 1 ) == 0;
endt1= LastValue(ValueWhen( pR, x, 1 ));
startt1=LastValue(ValueWhen( pR, x, 2 ));
endR = LastValue(ValueWhen( pR, s11, 1 ) );
startR = LastValue( ValueWhen( pR, s11, 2 ));
DTR=ENDT1-STARTT1;
aR = (endR-startR)/dtR;
bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;
BEGIN=Min(STARTT,STARTT1);
TRS = IIf(x>BEGIN-10,trendlineS,-1e10);
TRR = IIf(x>BEGIN-10,trendlineR,-1e10);

Condcolor=(Cross(C,trendlineR) AND X>ENDT1) OR (Cross(trendlineS,C) AND
X>ENDT);
BarColor=IIf(Condcolor,7,1);

Plot(TRS,"Support",colorBlack,styleLine,styleThick);
Plot(TRR,"Resist",colorBlack,styleLine,styleThick);

////////////////////////
///////////////////////
//////////////////////

_SECTION_BEGIN("Free SuperTrend");
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetChartOptions(1,chartShowArrows|chartShowDates|chartWrapTitle);


GraphXSpace = 15;

SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0);
SetChartBkGradientFill( ParamColor( "TopColor", ColorRGB( 217, 197, 137 ) ), ParamColor( "BottomColor", ColorRGB( 254, 244, 224 ) ) );

///////////
///////////////
///////////////////



_SECTION_BEGIN("pivots mw");
/***************************************/
/*SUPER PIVOT POINTS ver 1.3 day week month
by Avi b a
/***************************************/
/*
SUPER PIVOT POINTS can by used in 2 ways:
if you choose daily, the pivots are calculated from the previous day,
this can be used for daily charts.
the second option is next day for EOD charts.
for all the options available right click on the chart parameters.
to utilize all the program features you need amibroker from version 4.80.1 and above.
enjoy!
*/
/*-----------------data------------------*/
SetChartBkColor(2) ;
k=IIf(ParamList("select type","daily|next day")=="daily",-1,0);
k1=-1;
TimeFrameSet(inDaily);
day_h= LastValue(Ref(H,K));
day_l= LastValue(Ref(L,K));
day_c= LastValue(Ref(C,K));
TimeFrameRestore();

TimeFrameSet(inWeekly);
Week_h= LastValue(Ref(H,K1));
Week_l= LastValue(Ref(L,K1));;
Week_c= LastValue(Ref(C,K1));;
TimeFrameRestore();

TimeFrameSet(inMonthly);
month_h= LastValue(Ref(H,K1));
month_l= LastValue(Ref(L,K1));
month_c= LastValue(Ref(C,K1));
TimeFrameRestore();

/*--------------------------------------*/
// day
DH=Day_h;
DL=Day_L;
DC=Day_C;

// DAY PIVOT Calculation
pd = ( DH+ DL + DC )/3;
sd1 = (2*pd)-DH;
sd2 = pd -(DH - DL);
sd3 = Sd1 - (DH-DL);
sd4 = Sd2 - (DH-DL);
sd5 = Sd3 - (DH-DL);
rd1 = (2*pd)-DL;
rd2 = pd +(DH -DL);
rd3 = rd1 +(DH-DL);
rd4 = rd2 +(DH-DL);
rd5 = rd3 +(DH-DL);

// week
WH=Week_h;
WL=Week_l;
WC=Week_c;

// WEEK PIVOT Calculation
pw = ( WH+ WL + WC )/3;
sw1 = (2*pw)-WH;
sw2 = pw -(WH - WL);
sw3 = Sw1 - (WH-WL);
sw4 = Sw2 - (WH-WL);
rw1 = (2*pw)-WL;
rw2 = pw +(WH -WL);
rw3 = rw1 +(WH-WL);
rw4 = rw2 +(WH-WL);


// month
MH=month_h;
ML=month_l;
MC=month_c;

// MONTH PIVOT Calculation
pm = ( MH+ ML + MC )/3;
sm1 = (2*pm)-MH;
sm2 = pm -(MH - ML);
sm3 = Sm1 - (MH-ML);
rm1 = (2*pm)-ML;
rm2 = pm +(MH -ML);
rm3 = rm1 +(MH-ML);

/*--------------------------------------*/
// PARAMETERS
slide = Param("slide all",33,-1000,1000,1);
slide1 = Param("slide_day",50,0,1000,1);
slide2 = Param("slide_week",70,0,1000,1);
slide3 = Param("slide_month",90,0,1000,1);
slide_Hight = Param("slide_Hight",0,-1000,1000,1);


SHALD = ParamList("daily Pivots", "selected only|all|hide" );
SHALW = ParamList("weekly Pivots", "hide|all|selected only" );
SHALM = ParamList("monthly Pivots", "hide|all|selected only" );

//day
PDP = ParamList("DP", "SHOW|HIDE" );
PDR1 = ParamList("DR1", "SHOW|HIDE" );
PDR2 = ParamList("DR2", "SHOW|HIDE" );
PDR3 = ParamList("DR3", "SHOW|HIDE" );
PDR4 = ParamList("DR4", "HIDE|SHOW" );
PDR5 = ParamList("DR5", "HIDE|SHOW" );

PDS1 = ParamList("DS1", "SHOW|HIDE" );
PDS2 = ParamList("DS2", "SHOW|HIDE" );
PDS3 = ParamList("DS3", "SHOW|HIDE" );
PDS4 = ParamList("DS4", "HIDE|SHOW" );
PDS5 = ParamList("DS5", "HIDE|SHOW" );


//week
PWP = ParamList("WP", "HIDE|SHOW" );
PWR1 = ParamList("WR1", "HIDE|SHOW" );
PWR2 = ParamList("WR2", "HIDE|SHOW" );
PWR3 = ParamList("WR3", "HIDE|SHOW" );
PWR4 = ParamList("WR4", "HIDE|SHOW" );

PWS1 = ParamList("WS1", "HIDE|SHOW" );
PWS2 = ParamList("WS2", "HIDE|SHOW" );
PWS3 = ParamList("WS3", "HIDE|SHOW" );
PWS4 = ParamList("WS4", "HIDE|SHOW" );

//month
PMP = ParamList("MP", "HIDE|SHOW" );
PMR1 = ParamList("MR1", "HIDE|SHOW" );
PMR2 = ParamList("MR2", "HIDE|SHOW" );
PMR3 = ParamList("MR3", "HIDE|SHOW" );

PMS1 = ParamList("MS1", "HIDE|SHOW" );
PMS2 = ParamList("MS2", "HIDE|SHOW" );
PMS3 = ParamList("MS3", "HIDE|SHOW" );
PIVOTPOINTCOLOR=6;
DAILYSUPPORTCOLOR=5;
DayCOLOR =4;
weekCOLOR =9;
monthCOLOR =34;
/*--------------------------------------*/

// PLOTS
// style = IIf(ParamList("Chart style", "styleCandle|styleBar")=="styleCandle",64,128);
// Plot (C,Date ()+" close",11,style);
//day
if ((PDP=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (pd,"daily Pivot ",PIVOTPOINTCOLOR,8);
if ((PDR1=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (rd1,"daily R1 ",DayCOLOR,8);
if ((PDR2=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (rd2,"daily R2 ",DayCOLOR,8);
if ((PDR3=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (rd3,"daily R3 ",DayCOLOR,8);
if ((PDR4=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (rd4,"daily R4 ",DayCOLOR,8);
if ((PDR5=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (rd5,"daily R5 ",DayCOLOR,8);

if ((PDS1=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (sd1,"daily S1 ",DAILYSUPPORTCOLOR,8);
if ((PDS2=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (Sd2,"daily S2 ",DAILYSUPPORTCOLOR,8);
if ((PDS3=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (Sd3,"daily S3 ",DAILYSUPPORTCOLOR,8);
if ((PDS4=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (Sd4,"daily S4 ",DAILYSUPPORTCOLOR,8);
if ((PDS5=="SHOW" OR SHALD=="all") && SHALD!="hide") Plot (Sd5,"daily S5 ",DAILYSUPPORTCOLOR,8);


//week
if ((PWP=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (pW,"weekly Pivot ",weekCOLOR,1);
if ((PWR1=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (rw1,"weekly R1 ",weekCOLOR,32);
if ((PWR2=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (rw2,"weekly R2 ",weekCOLOR,32);
if ((PWR3=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (rw3,"weekly R3 ",weekCOLOR,32);
if ((PWR4=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (rw4,"weekly R4 ",weekCOLOR,32);


if ((PWS1=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (sw1,"weekly S1 ",weekCOLOR,32);
if ((PWS2=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (Sw2,"weekly S2 ",weekCOLOR,32);
if ((PWS3=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (Sw3,"weekly S3 ",weekCOLOR,32);
if ((PWS4=="SHOW" OR SHALW=="all") && SHALW!="hide") Plot (Sw4,"weekly S4 ",weekCOLOR,32);

//month
if ((PMP=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (pm,"monthly Pivot",monthCOLOR ,1);
if ((PMR1=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (rm1,"monthly R1",monthCOLOR ,32);
if ((PMR2=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (rm2,"monthly R2",monthCOLOR ,32);
if ((PMR3=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (rm3,"monthly R3",monthCOLOR ,32);

if ((PMS1=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (sm1,"monthly S1",monthCOLOR ,32);
if ((PMS2=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (sm2,"monthly S2",monthCOLOR ,32);
if ((PMS3=="SHOW" OR SHALM=="all") && SHALM!="hide") Plot (sm3,"monthly S3",monthCOLOR ,32);
/*--------------------------------------*/



//////////
/////////////
///////////////


////////////////////////
//////////////////////////
////////////////////////////
////////////////////////////////


///////////////////////

_SECTION_BEGIN("AuthorName");
k = (GetPerformanceCounter()/100)%100;
printf("GetPerformance Counter %g",k);
GfxSelectFont("arial",17,800);
GfxSetBkMode(1);
GfxSetTextColor(colorBlack);
GfxTextOut("C="+C+" " ,430,20);
RequestTimedRefresh(10);
_SECTION_END();


_SECTION_BEGIN("High");
{ GfxSelectFont("arial",17, 800 );
GfxSetBkMode(1);
GfxSetTextColor(colorBlack);
GfxTextOut("H="+H+" ",750,20);
}
_SECTION_END();

_SECTION_BEGIN("Open");
{ GfxSelectFont("arial",17, 800 );
GfxSetBkMode(1);
GfxSetTextColor(colorBlack);
GfxTextOut("O="+O+" ",650,20);
}
_SECTION_END();

_SECTION_BEGIN("Low");
{ GfxSelectFont("arial",17, 800 );
GfxSetBkMode(1);
GfxSetTextColor(colorBlack);
GfxTextOut("L="+L+" ",550,20);
}
_SECTION_END();

/////////////////////
//////////////////////


//Magfied Market Price
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorGreen) );
Hor=Param("Horizontal Position",940,1,1200,1);
Ver=Param("Vertical Position",12,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 11, 700, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+45 );
_SECTION_END();


/////////////////
/////////////////
////////////////////






//////////////////////////////////////////////////////////////////



/////////////////////


////////////////////////
////////////////////////

/////////////////////


////////////////////////
////////
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);



GfxSetBkMode( 1 );
GfxSelectFont("Courier New", 14, 700 );
GfxSetTextColor( colorWhite );
GfxSelectPen( colorBlack, 1, 0) ;
GfxSelectSolidBrush( colorWhite );


LeftMargin =1500;
y=120;

RSIValue =RSI(14);
GfxSetTextColor( colorGreen);
GfxTextOut( WriteIf(RSIValue >=60 , "RSI Buy:"+ NumToStr(RSIValue ,1.2,False) ,""),LeftMargin , y-100);

GfxSetTextColor( colorWhite);
GfxTextOut( WriteIf(RSIValue >= 40 AND RSIValue < 60 , "RSI Neutral:"+NumToStr(RSIValue ,1.2,False) ,""),LeftMargin , y-100);
GfxSetTextColor( colorRed);
GfxTextOut( WriteIf(RSIValue <40 ,"RSI Sell:"+NumToStr(RSIValue ,1.2,False) ,""),LeftMargin , y-100);

CCIValue =CCI(27);
GfxSetTextColor( colorGreen);
GfxTextOut( WriteIf(CCIValue >=10 , "CCI Buy:"+ NumToStr(CCIValue ,1.2,False) ,""),LeftMargin , y-80);
GfxSetTextColor( colorWhite);
GfxTextOut( WriteIf(CCIValue >= -10 AND CCIValue < 10 , "CCI Neutral:"+NumToStr(CCIValue ,1.2,False) ,""),LeftMargin , y-80);

GfxSetTextColor( colorRed);
GfxTextOut( WriteIf(CCIValue <-10 ,"CCI Sell:"+NumToStr(CCIValue ,1.2,False) ,""),LeftMargin , y-80);

_SECTION_END();



/////////////////////////////////




_SECTION_BEGIN("Color tema");

function ZeroLagTEMA( array, period )
{
TMA1 = TEMA( array, period );
TMA2 = TEMA( TMA1, period );
Diff = TMA1 - TMA2;
return TMA1 + Diff ;
}

/////////////////////
// Heikin-Ashi code
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );

avp = Param("Up TEMA avg", 34, 1, 600 );
avpdn = Param("Dn TEMA avg", 34, 1, 600 );

// Velvoort is using not original, but modified Heikin-Ashi close
HaClose = ( HaClose + HaOpen + Max( H, HaOpen ) + Min( L, HaOpen ) )/4;

// up average
ZlHa = ZeroLagTEMA( HaClose, avp );
ZlCl = ZeroLagTEMA( ( H + L ) / 2, avp );
ZlDif = ZlCl - ZlHa;

keep1 = Hold( HaClose >= HaOpen, 2 );
keep2 = ZlDif >= 0;
keeping = keep1 OR keep2;
keepall = keeping OR ( Ref( keeping, -1 ) AND ( C > O ) OR C >= Ref( C, -1 ) );
keep3 = abs( C - O ) < ( H - L ) * 0.35 AND H >= Ref( L, -1 );
utr = keepall OR ( Ref( keepall, -1 ) AND keep3 );

// dn average
ZlHa = ZeroLagTEMA( HaClose, avpdn );
ZlCl = ZeroLagTEMA( ( H + L ) / 2, avpdn );
ZlDif = ZlCl - ZlHa;

keep1 = Hold( HaClose < HaOpen, 2 );
keep2 = ZlDif < 0;
keeping = keep1 OR keep2;
keepall = keeping OR ( Ref( keeping, -1 ) AND ( C < O ) OR C < Ref( C, -1 ) );
keep3 = abs( C - O ) < ( H - L ) * 0.35 AND L <= Ref( H, -1 );
dtr = keepall OR ( Ref( keepall, -1 ) AND keep3 );

upw = dtr == 0 AND Ref( dtr, -1 ) AND utr;
dnw = utr == 0 AND Ref( utr, -1 ) AND dtr;

Haco = Flip( upw, dnw );


if( ParamToggle("Chart Type", "Price with color back|HACO wave" ) )
{
Plot( Haco, "Haco", colorRed );
}
else
{
Plot( C, "Close", colorBlack,
ParamStyle( "Style", styleCandle, maskPrice ) );
Plot( 1, "", IIf( Haco , colorPaleGreen, colorRose ),
styleArea | styleOwnScale, 0, 1 );
}
_SECTION_END();


////////////////
/////////////////
 

Attachments