Nifty : Real time discussions...!

Status
Not open for further replies.

augubhai

Well-Known Member

PGDIMES

Well-Known Member
Today's trades in nifty futures...

Long @ 5461 in MNF... sq. off @ 5484...

Short @ 5518 in NF... sq. off @ 5515... as had to go elsewhere... could be a good profitable intraday trade...

Short @ 5491 in NF... sq. off @ 5480...

total 37 points without brokerage (I consider 2 points bkg per round of trade)... :)
 

msa5678

Well-Known Member
Hi Linkonji,

I have a passion for collecting AFL's and testing them on Nifty Futures. My modus operandi is like this. First I backtest them for 3 months period, If I find them profitable , I backtest them for 6 months, and so on in 3 month increments. I include the toppers my positional trading.

During this process I found that one AFL by the name "Linkon's Secret on Price21", gives astounding results. It has given an average of 7 points per DAY, (not trading day). i.e. it gave 1393 points in 199 days, with a maximum continous loss of 300 points and a maximum single loss of 109 points.

Can you comment on this masterpiece creation of yours. Any suggestions on adjusting the parameters , if necessary, to increase the consistency , will be appreciated.

Regards:)
 
Last edited:

linkon7

Well-Known Member
Hi Linkonji,

I have a passion for collecting AFL's and testing them on Nifty Futures. My modus operandi is like this. First I backtest them for 3 months period, If I find them profitable , I backtest them for 6 months, and so on in 3 month increments. I include the toppers my positional trading.

During this process I found that one AFL by the name "Linkon's Secret on Price21", gives astounding results. It has given an average of 7 points per DAY, (not trading day). i.e. it gave 1393 points in 199 days, with a maximum continous loss of 300 points and a maximum single loss of 109 points.

Can you comment on this masterpiece creation of yours. Any suggestions on adjusting the parameters , if necessary, to increase the consistency , will be appreciated.

Regards:)
Can u post the afl... since i dont have it myself.
On which time frame did u test it. single loss of 109 and 300 point continuous loss is not encouraging...!
 

msa5678

Well-Known Member
Can u post the afl... since i dont have it myself.
On which time frame did u test it. single loss of 109 and 300 point continuous loss is not encouraging...!
Hi Linkonji,

Here is the AFL, the singlle loss of 109 pts and 300 continous are exceptional, generally it is not that much.

_SECTION_BEGIN("MACD");
//SetChartBkColor( colorBlack ) ;

SetChartBkGradientFill( ParamColor("Inner panel upper",colorWhite),ParamColor("Inner panel lower",colorLightYellow));
//Title = ("L I N K O N \n" + Name()+" " + Date() +" "+Interval(2) +" \n"+ EncodeColor(colorBlack)+"Open "+Open +" ,High "+H+" ,Low "+L+" ,Close "+C+" "+"{{VALUES}}");


r1 = Param( "Fast avg", 11, 3, 20, 1 );
r2 = Param( "Slow avg", 35, 10, 35, 1 );
r3 = Param( "Signal avg", 6, 3, 20, 1 );
ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hst = ml-sl;

A1=EMA(C,4)-EMA(C,34);
BBtops=BBandTop(A1,10,1);
BBbots=BBandBot(A1,10,1);

//Color_bar=IIf(a1<0 AND a1>Ref(a1,-1), colorAqua,IIf(a1>0 AND a1>Ref(a1,-1),colorBlue,IIf(a1>0 AND a1<Ref(a1,-1),colorOrange,colorRed)));
Color_bar=IIf(a1>BBtops, colorBlue,IIf(a1<BBbots,colorRed,colorYellow));

//Plot( ml = MACD(3, 11), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD style") );
//Plot( sl = Signal(3,11,16), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
bbtop = BBandTop( Hst, 10, 1 );
bbbot = BBandBot( Hst, 10,1 );
//Plot( BBandTop( Hst, 9, 1 ), "BBTop", colorYellow, styleDashed );
//Plot( BBandBot( Hst, 9,1 ), "BBBot", colorYellow, styleDashed );

Color = IIf (Hst > BBtop,colorBlue,IIf(hst < bbbot,colorRed, colorYellow));
//Plot( Hst, "secret", color , styleThick );
/*
Buy = Cross (Hst,bbtop);
Sell = Cross (bbtop,Hst);
Short = Cross (bbbot,Hst);
Cover = Cross (Hst,bbbot);
*/
band = Param("band",10,1,40,1);
//Buy = Color == colorBlue AND Close > EMA(High,band);
//Short = color== colorRed AND Close < EMA (Low,band);
Buy = Color == colorBlue AND Color_bar==colorBlue AND Close > EMA(High,band);
Short = color== colorRed AND Color_bar == colorRed AND Close < EMA (Low,band);

Buy = ExRem(Buy, Short);
Short = ExRem(Short, Buy);

Sell = Short;
Cover = Buy ;

Hi = EMA(High,band);
Lo = EMA(Low,band);
//PlotShapes (Buy*shapeUpArrow,colorYellow);
//PlotShapes (Short*shapeDownArrow,colorYellow);
//PlotShapes (Sell*shapeHollowCircle,colorRed);
//PlotShapes (Cover*shapeHollowCircle,colorGreen);
//Plot (Close,"close",Color_bar,styleCandle);
Plot( Close, "", colorWhite, styleCandle, styleThick );
Plot (Hi,"upper band",colorWhite,styleDashed);
Plot (Lo,"lower band",colorWhite,styleDashed);


//Plot(6, "", Color, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();

_SECTION_BEGIN("Support & Resistance");
//Support and resistance levels using RSI.
//graham Kavanagh May 2003
//Load into Indicator Builder
//Sensitivity of the levels can be changed with the variables
//Can test different numbers live with the Param function ctrl-R with open pane
RSIperiod = 5; // Param("RSI p",3,14,30,1);
Percent = 5; // Param("ZIG %",8,9,15,1);
EMAperiod = 5; //Param("EMA p",4,5,10,1);
HHVperiod = 5; //Param("HHV p",3,5,10,1);
NumLine = 1; //Param("Num Lines",3,1,20,1);

Base = DEMA(RSI(RSIperiod),EMAperiod);

//GraphXSpace=0.5;
//Plot(C,"",colorWhite,styleCandle);

for( i = 1; i <= numline; i++ )
{
ResBase = LastValue(Peak(Base,Percent,i));
SupBase = LastValue(Trough(Base,Percent,i));
Plot(ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), "Resist Level", colorRed, styleLine);
Plot(ValueWhen( supbase==Base, LLV(L,HHVperiod) ), "Support Level", colorGreen, styleLine);
}
//Title = Name() + "; " + Date() + ": Support & Resistance Levels using RSI: " + /*EncodeColor(colorGreen)+ "Support Levels are Green; "+EncodeColor(colorRed)+ "Resistance Levels are Red: "+EncodeColor(colorBlack)+*/ "Num lines ="+WriteVal(numline,1) ;



dist = 1.0*ATR(20);

for( i = 0; i < BarCount; i++ )
{
//if( Buy ) PlotText( "Buy\n@" + C[ i ]+"\n sl :"+ValueWhen( supbase==Base, LLV(L,HHVperiod) ) , i, L[ i ]-dist, colorBlack,colorGreen );
//if( Short ) PlotText( "Sell\n@" + C[ i ]+"\n sl :"+ ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), i, H[ i ]+dist, colorBlack, colorRed );
if( Buy ) PlotText( " Buy \n@" + C[ i ] , i, L[ i ]-dist, colorBlack,colorGreen );
if( Short ) PlotText( " Sell \n@" + C[ i ], i, H[ i ]+dist, colorBlack, colorRed );


}


t1= Flip(Buy,Sell);
t2= Flip(Sell,Buy);
BPrice=ValueWhen(t1 AND Ref(t1,-1)==0,C,1);
SPrice=ValueWhen(t2 AND Ref(t2,-1)==0,C,1);

//AlertIf( Buy, "EMAIL", "Buy NMA @ "+Bprice+" "+FullName() , 1, flags = 12, Lookback = 100 );
//AlertIf( Sell, "EMAIL", "Sell NMA @ "+SPrice+" "+FullName() , 2, flags = 12, Lookback = 100 );


PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorBlack, colorBlack ) );
GfxSetBkMode(1);
GfxSelectPen( colorBlack, 1, 0) ;
GfxSelectSolidBrush( colorPink );
GfxRoundRect( 3, 3, 250, 65, 9, 9 ) ;
GfxSelectFont("Courier New", 9, 700 );

GfxTextOut(" L I N K O N", 25, 10);
//GfxTextOut((WriteIf(Buy , "Last Buy Trigger at : "+C+" ", "")), 25, 45);
//GfxTextOut((WriteIf(Sell , "Last Sell Trigger at : "+C+" ", "")), 25, 45);
GfxTextOut("Current Price : " + C, 25, 25);
GfxTextOut(" " +Date() , 25, 45);




_SECTION_END();

_SECTION_BEGIN("Time Left");
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;

x=Param("xposn",918,0,1000,1);
y=Param("yposn",586,0,1000,1);

GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
Say( "New period" );
}
GfxRoundRect( x+55, y+17, x-4, y-2, 0, 0 );
GfxSetBkMode(1);
GfxSelectFont( "Arial", 9, 700, False );
GfxSetTextColor( colorBlack );
GfxTextOut( ""+SecsToGo+" / "+NumToStr( TimeFrame, 1.0 ), x, y );
_SECTION_END();


Certain lines like the red color ones, I have added to suit my needs, I might have added some other lines which I am not remebering. But all my additions will be for visual aid only.

Regards:)
 

linkon7

Well-Known Member

image uploader

This system uses 10 ema of high / low to make the band, measures the momentum using a fast macd and histogram of a slower macd.

Definitely not one of my finest work. Simple reason is, back test will give u a very big winner which we wont be able to hold for its whole duration without acting smart. System will give many whipsaws which we wont be able to avoid.

Unless we have some nice trend on eod, this system will remain a killer. Once we have a trend on eod, any system will do great.
 
Status
Not open for further replies.

Similar threads