Equity Stock Positional Trading System

Equity Stock Positional Trading System AFL is specially compiled for Equity Cash Stocks Positional Trading on Daily Charts only. Stocks can be bought first and buy or exit should be done by taking buy sell arrow signal. Blue Ribbon Channel lines can be used for Stoploss or Trailing Stoploss. Dotted Line Green color can be used for confirmation of signal and also to re-enter into stock. Just download your EOD data, use Amibroker Analysis for scanning multiple stocks for specified period and take trades.

Download Equity Stock Positional Trading System for Amibroker

AmiTrader

COPY & PASTE CODE :

_SECTION_BEGIN( “Positional Trading” );
Kisa = 12;
Uzun = 43;
Tetik = 21;

function KisaPeriodTopla( Kisa )
{
ka = Kisa;

for ( i = 1; i < Kisa; i++ )
{
ka = ka + i;
}

return ka;
}

function UzunPeriodTopla( Uzun )
{
au = Uzun;

for ( iu = 0; iu < Uzun; iu++ )
{
au = au + iu;
}

return au;
}

function TetikPeriodTopla( Tetik )
{
a = Tetik;

for ( i = 0; i < Tetik; i++ )
{
a = a + i;
}

return a;
}

function KisaGunTopla( Kisa )
{
a = Kisa;
kd = a * C;

for ( i = 0;i < Kisa;i++ )
{
b = Ref( C, -i );

if ( a > 0 )
a–;

kd = kd + ( a * b );
}

return kd;
}

function UzunGunTopla( Uzun )
{
au = Uzun;
ku = au * C;

for ( iu = 0;iu < Uzun;iu++ )
{
bu = Ref( C, -iu );

if ( au > 0 )
au–;

ku = ku + ( au * bu );
}

return ku;
}

Period12Toplam = KisaPeriodTopla( Kisa );
Day12Toplam = KisaGunTopla( Kisa );
LWMA12 = Day12Toplam / Period12Toplam;
Period43Toplam = UzunPeriodTopla( Uzun );
Day43Toplam = UzunGunTopla( Uzun );
LWMA43 = Day43Toplam / Period43Toplam;

function XDAY( Tetik )
{
X = ( ( 2 * LWMA12 ) – LWMA43 );
aX = Tetik;
kX = AX * X;

for ( iX = 0;iX < Tetik;iX++ )
{
bX = Ref( X, -iX );

if ( aX > 0 )
aX–;

kX = kX + ( aX * bX );
}

return kX;
}

XDayToplam = XDAY( Tetik );
XPeriodToplam = TetikPeriodTopla( Tetik );
TSR = ( XDayToplam / XPeriodToplam );

tsrcolor = IIf( TSR > Ref( TSR, -1 ), colorLime, colorRed );
Plot( TSR, “”, tsrcolor, styleDots + styleLine );

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 ) ) ));
k=MA(C,6)*0.04/100;
ab=(MA(H,39)+k);
ba=(MA(L,39)-k);
Plot(ab,””,colorBlue,styleLine);
Plot(ba,””,colorBlue,styleLine);
Color=IIf(C>ab,colorGreen,IIf(C<ba,colorRed,colorLightGrey));
Plot(C,””,color,styleCandle|styleThick);
function Momentum( array, period )
{
return array – Ref( array, -period );
}

XXX=Momentum(C,10);

Buy=xxx>0 AND C>ab;Short=xxx<0 AND C<ba;

Buy=ExRem(Buy,Short);
Short=ExRem(Short,Buy);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBrightGreen);

PlotShapes(IIf(Short,shapeDownArrow,shapeNone),colorRed);

_SECTION_END();