Pride's Nifty Trading system!!

#2
i'm also new to amibroker, but this is what I came up with (can anyone pls check if this is ok?? I'm bound to make errors as I am just starting to learn afl):

Buy=Cross(EMA( Close, 5),EMA( Close, 13));
Buy=EMA( Close, 5) > Ref( EMA( Close, 5) , -1 );
Buy=StochK( 8, 3 ) > StochD( 4 );
Buy=StochK( 8, 3 ) > Ref( StochK( 8, 3 ) , -1 );
Sell=Cross(EMA( Close, 13),EMA( Close, 5));
Sell=EMA( Close, 5) < Ref( EMA( Close, 5) , -1 );
Sell=StochK( 8, 3 ) < StochD( 4 );
Sell=StochK( 8, 3 ) < Ref( StochK( 8, 3 ) , -1 );
Filter=Buy OR Sell;
AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar );
AddColumn( EMA( Close, 5), "EMAST", 1.4 );
AddColumn( EMA( Close, 13), "EMALT", 1.4 );
AddColumn( StochK(), "StochK", 1.4 );
AddColumn( StochD(), "StochD", 1.4 );

then run backcheck.

When doing a backcheck since 1/1/2010, I found a small profit of 1,58% over a period of approx 3 months. Not much, but it is positive :)
 
#4
Hello all
I have also problems..I am using 4.8 version of Amibroker...It shows intraday..or hourly chart settings...How to set 30 minute settings?...How to set stochastic 8,3,4?
 
#6
Hello all!
Following AFL is not showing anything...Can someone tell me what is wrong?...I have set the amibroker chart to one minute setting...my version is 4.2....The AFL is as follows...
_SECTION_BEGIN("Stochastic_30_MINS");
periods = Param( "Periods", 8, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 4, 1, 200, 1 );

TimeFrameSet(in1Minute * 30);
k30 = StochK( periods , Ksmooth);
d30 = StochD( periods , Ksmooth, DSmooth );
TimeFrameRestore();

K = TimeFrameExpand(k30, in1Minute * 30);
D = TimeFrameExpand(d30, in1Minute * 30);

Plot(D, "D", colorRed, styleThick );
Plot(K, "K", colorBlue, styleThick );

Hi = IIf(k > d, k, d);
Lo = IIf(k < d, k, d);

COLOR = IIf(Ref(d,1) > Ref(k,1), colorRed, colorBlue);
//COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR);

PlotOHLC(Lo,Hi,Lo,Hi,"",COLOR, styleNoLabel | styleCloud);

_SECTION_END();
Surprisingly this AFL is showing signals in EOD charts...How I don't know?
 

Similar threads