trend blaster system

bunti_k23

Well-Known Member
#1
this system showing some great profits ,do backtest it with good historical data.




Code:
_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
SetChartOptions(0,chartShowArrows|chartShowDates);
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorWhite) );
Hor=Param("Horizontal Position",750,1,1200,1);
Ver=Param("Vertical Position",7,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( colorWhite );
GfxSetTextColor(ParamColor("Color",colorWhite) );

//GfxTextOut("Open - "+O+" High - "+H+" Low - "+L+" Close - "+C, Horr , Verr-14 );
//GraphXSpace = Param("Graph Space",500,-10,500,1);

_SECTION_END();

_SECTION_BEGIN("Trend Blaster V1.2");

SetChartBkColor(ParamColor("Outer panel color ",colorLightYellow));
SetChartBkColor(ParamColor("BackGround Color", colorDarkGrey));
messageboard =ParamToggle("Message Board","Show|Hide",1);
no = Optimize("TSL",Param("A (Change To Optimise)",10, 1, 55 ,1),1,20 ,1);
multiplier1 = Optimize("Multiplier1",Param("B (Change To Optimise)",5, 1, 55 ,1),1, 25 ,1);
multiplier2 = Optimize("Multiplier2",Param("C (Change To Optimise)",22, 1, 55 ,1),1, 25 ,1);
showtsl =ParamToggle("Show SL Line","No|Yes");
aggressivemode =ParamToggle("Aggressive Mode","Yes|No",0);
stopreverse =ParamToggle("Switch To Stop And Reverse","No|Yes",0);
CloseAtEnd = ParamToggle("Close Positions EOD", "No|Yes");
ShowBands = ParamToggle("Show Trending Bands", "No|Yes");
supres=ParamToggle("Show Support / Resistance","No|Yes");
ShowCrossover = ParamToggle("Show Crossover", "No|Yes");
AudioAlert = ParamToggle("Human Voice Alert", "No|Yes");
EmailAlert = ParamToggle("E-mail Alert", "No|Yes");
AlertOutput = ParamToggle("Alert Output", "No|Yes");
showtrendline = ParamToggle("Show Trend Line", "No|Yes");
fibs = ParamToggle("Plot Fibonacci Retracement","No|Yes");
text = ParamToggle("Plot Fibonnaci As Text","No|Yes",0);
mktclose=Param("Market Close Time",152500,000000,235959,1 );

function TBR(no)
{
dres=HHV(H,no);
dsup=LLV(L,no);
davd=IIf(H>Ref(dres,-1),1,IIf(L<Ref(dsup,-1),-1,0));
davn=ValueWhen(davd!=0,davd,1);
dtsl1=IIf(davn==1,dsup,dres);
return dtsl1;
}

SetChartOptions(0,chartShowArrows|chartShowDates);
Plot(Close,"Price",colorBlack, styleCandle);
dtsl=TBR(no);
Horr=360;
Horr1=25;
Verr=14;


GfxTextOut("POSITIONAL Return val "+TBR(no), Horr , Verr+54 );

dB=H>dtsl;
dS=L<dtsl;
TimeFrameSet(multiplier1*Interval());
wtsl=TBR(no);
WB=H>WTSL;
WS=L<WTSL;
TimeFrameRestore();
wtsl=TimeFrameExpand(wtsl,multiplier1*Interval(),expandFirst);
wb=TimeFrameExpand(WB,multiplier1*Interval(),expandFirst);
ws=TimeFrameExpand(WS,multiplier1*Interval(),expandFirst);


TimeFrameSet(multiplier2*Interval());
mtsl=TBR(no);
MB=H>MTSL;//Cross(H,mtsl);
MS=L<MTSL;//Cross(mtsl,L);
TimeFrameRestore();
mtsl=TimeFrameExpand(mtsl,multiplier2*Interval(),expandFirst);
mb=TimeFrameExpand(MB,multiplier2*Interval(),expandFirst);
ms=TimeFrameExpand(MS,multiplier2*Interval(),expandFirst);

Buy = IIf((Low > WTSL AND Low > MTSL), DB, ((WB AND Low > DTSL AND Low > MTSL) OR (MB AND Low > DTSL AND Low > WTSL)));
Sell=IIf(CloseAtEnd==False, (DS OR (DS AND WS) AND (Low > MTSL)), (DS OR (DS AND WS) AND (Low > MTSL)) OR TimeNum() > mktclose);
Short = IIf((High < WTSL AND High < MTSL), DS, (WS AND High < DTSL AND High < MTSL) OR (MS AND High < DTSL AND High < WTSL ));
Cover=IIf(CloseAtEnd==False, (DB OR (DB AND WB) AND (High < MTSL)), (DB OR (DB AND WB) AND (High < MTSL)) OR TimeNum() > mktclose);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
Long=Flip(Buy,Sell);
Shrt=Flip(Short,Cover);
Relax = NOT Long AND NOT Buy AND NOT shrt AND NOT Sell AND NOT Sell AND NOT Cover;
SellSL=ValueWhen(Short,DTSL,1);
BuySL=ValueWhen(Buy,DTSL,1);
BuyDifference= BuyPrice - BuySL;
SellDifference = SellSL - SellPrice;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-25);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-35);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-30);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=25);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=35);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-30);

PlotShapes(IIf(Sell, shapeStar, shapeNone),colorGold, 0, L, Offset=-15);
PlotShapes(IIf(Cover, shapeStar, shapeNone),colorGold, 0,L, Offset=-15);
PlotShapes(IIf(CloseAtEnd==True AND TimeNum() > mktclose AND NOT Relax, shapeStar, shapeNone),colorGold, 0,L, Offset=-15);
tsl = IIf(Buy OR Long OR Short OR Shrt AND NOT Relax, dtsl,Null);
tslcolor = IIf(Buy OR Long AND NOT Relax, colorGreen, colorRed);
Plot(tsl, "",tslcolor, styleLine|styleDots|styleThick);
_SECTION_END();
backtested on 1min nifty future data from 5/11/2007 to 28/8/2014

data downloaded from radiosilk thread.

max system drawdown was -13.17

share your thoughts abt the system.


 

BNFTrader

Active Member
#2
Just curious to know, if its good, why not trade it why looking for others to also confirm it is good . . .

Thanks
 

bunti_k23

Well-Known Member
#3
Just curious to know, if its good, why not trade it why looking for others to also confirm it is good . . .

Thanks
ya its results are pretty convincing iam about to use this system instead of mine which i was thinking is better than any uptil now but stats of this system is pretty much good than my system.so i was just looking that anyone previously using this system will share his exp and thoughts...:)
 

BNFTrader

Active Member
#4
ya its results are pretty convincing iam about to use this system instead of mine which i was thinking is better than any uptil now but stats of this system is pretty much good than my system.so i was just looking that anyone previously using this system will share his exp and thoughts...:)
2 points what i noticed

First

It looks like you are using unlimited size and it gives wrong effect add this code anywhere in the AFL and test again . . .

SetPositionSize(1,4);


This will give you the result in number of points.


Second

Maybe you are not taking into consideration the transaction cost (brokerage & average slippage)

On lower TF like 1 minute this can put the Positive system into -ve

But once you get the result in number of points without compounding the size on every trade,
then you can reduce the profit by number of trades x 2/3 points for brokerage and whatever slippage you consider to be appropriate

Thanks

Note: Have neither used the above sys or tested it :thumb:
 

ocil

Well-Known Member
#5
If you use TBS below 15M time frame its repaint the signal. So you will get very good result. I have TBS 4 and its useless. free Super trend ver 4 is better compare to TBS. TBS code is copy from free AFL Thunder Bird Trading System v1.1.

this system showing some great profits ,do backtest it with good historical data.




Code:
_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
SetChartOptions(0,chartShowArrows|chartShowDates);
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorWhite) );
Hor=Param("Horizontal Position",750,1,1200,1);
Ver=Param("Vertical Position",7,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( colorWhite );
GfxSetTextColor(ParamColor("Color",colorWhite) );

//GfxTextOut("Open - "+O+" High - "+H+" Low - "+L+" Close - "+C, Horr , Verr-14 );
//GraphXSpace = Param("Graph Space",500,-10,500,1);

_SECTION_END();

_SECTION_BEGIN("Trend Blaster V1.2");

SetChartBkColor(ParamColor("Outer panel color ",colorLightYellow));
SetChartBkColor(ParamColor("BackGround Color", colorDarkGrey));
messageboard =ParamToggle("Message Board","Show|Hide",1);
no = Optimize("TSL",Param("A (Change To Optimise)",10, 1, 55 ,1),1,20 ,1);
multiplier1 = Optimize("Multiplier1",Param("B (Change To Optimise)",5, 1, 55 ,1),1, 25 ,1);
multiplier2 = Optimize("Multiplier2",Param("C (Change To Optimise)",22, 1, 55 ,1),1, 25 ,1);
showtsl =ParamToggle("Show SL Line","No|Yes");
aggressivemode =ParamToggle("Aggressive Mode","Yes|No",0);
stopreverse =ParamToggle("Switch To Stop And Reverse","No|Yes",0);
CloseAtEnd = ParamToggle("Close Positions EOD", "No|Yes");
ShowBands = ParamToggle("Show Trending Bands", "No|Yes");
supres=ParamToggle("Show Support / Resistance","No|Yes");
ShowCrossover = ParamToggle("Show Crossover", "No|Yes");
AudioAlert = ParamToggle("Human Voice Alert", "No|Yes");
EmailAlert = ParamToggle("E-mail Alert", "No|Yes");
AlertOutput = ParamToggle("Alert Output", "No|Yes");
showtrendline = ParamToggle("Show Trend Line", "No|Yes");
fibs = ParamToggle("Plot Fibonacci Retracement","No|Yes");
text = ParamToggle("Plot Fibonnaci As Text","No|Yes",0);
mktclose=Param("Market Close Time",152500,000000,235959,1 );

function TBR(no)
{
dres=HHV(H,no);
dsup=LLV(L,no);
davd=IIf(H>Ref(dres,-1),1,IIf(L<Ref(dsup,-1),-1,0));
davn=ValueWhen(davd!=0,davd,1);
dtsl1=IIf(davn==1,dsup,dres);
return dtsl1;
}

SetChartOptions(0,chartShowArrows|chartShowDates);
Plot(Close,"Price",colorBlack, styleCandle);
dtsl=TBR(no);
Horr=360;
Horr1=25;
Verr=14;


GfxTextOut("POSITIONAL Return val "+TBR(no), Horr , Verr+54 );

dB=H>dtsl;
dS=L<dtsl;
TimeFrameSet(multiplier1*Interval());
wtsl=TBR(no);
WB=H>WTSL;
WS=L<WTSL;
TimeFrameRestore();
wtsl=TimeFrameExpand(wtsl,multiplier1*Interval(),expandFirst);
wb=TimeFrameExpand(WB,multiplier1*Interval(),expandFirst);
ws=TimeFrameExpand(WS,multiplier1*Interval(),expandFirst);


TimeFrameSet(multiplier2*Interval());
mtsl=TBR(no);
MB=H>MTSL;//Cross(H,mtsl);
MS=L<MTSL;//Cross(mtsl,L);
TimeFrameRestore();
mtsl=TimeFrameExpand(mtsl,multiplier2*Interval(),expandFirst);
mb=TimeFrameExpand(MB,multiplier2*Interval(),expandFirst);
ms=TimeFrameExpand(MS,multiplier2*Interval(),expandFirst);

Buy = IIf((Low > WTSL AND Low > MTSL), DB, ((WB AND Low > DTSL AND Low > MTSL) OR (MB AND Low > DTSL AND Low > WTSL)));
Sell=IIf(CloseAtEnd==False, (DS OR (DS AND WS) AND (Low > MTSL)), (DS OR (DS AND WS) AND (Low > MTSL)) OR TimeNum() > mktclose);
Short = IIf((High < WTSL AND High < MTSL), DS, (WS AND High < DTSL AND High < MTSL) OR (MS AND High < DTSL AND High < WTSL ));
Cover=IIf(CloseAtEnd==False, (DB OR (DB AND WB) AND (High < MTSL)), (DB OR (DB AND WB) AND (High < MTSL)) OR TimeNum() > mktclose);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
Long=Flip(Buy,Sell);
Shrt=Flip(Short,Cover);
Relax = NOT Long AND NOT Buy AND NOT shrt AND NOT Sell AND NOT Sell AND NOT Cover;
SellSL=ValueWhen(Short,DTSL,1);
BuySL=ValueWhen(Buy,DTSL,1);
BuyDifference= BuyPrice - BuySL;
SellDifference = SellSL - SellPrice;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-25);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-35);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-30);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=25);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=35);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-30);

PlotShapes(IIf(Sell, shapeStar, shapeNone),colorGold, 0, L, Offset=-15);
PlotShapes(IIf(Cover, shapeStar, shapeNone),colorGold, 0,L, Offset=-15);
PlotShapes(IIf(CloseAtEnd==True AND TimeNum() > mktclose AND NOT Relax, shapeStar, shapeNone),colorGold, 0,L, Offset=-15);
tsl = IIf(Buy OR Long OR Short OR Shrt AND NOT Relax, dtsl,Null);
tslcolor = IIf(Buy OR Long AND NOT Relax, colorGreen, colorRed);
Plot(tsl, "",tslcolor, styleLine|styleDots|styleThick);
_SECTION_END();
backtested on 1min nifty future data from 5/11/2007 to 28/8/2014

data downloaded from radiosilk thread.

max system drawdown was -13.17

share your thoughts abt the system.


 

mmca2006

Active Member
#7
2 points what i noticed
Code:
First

It looks like you are using unlimited size and it gives wrong effect add this code anywhere in the AFL and test again . . . 

[COLOR="Red"][B]SetPositionSize(1,4);[/B][/COLOR]


This will give you the result in number of points.
What does it mean? How it effects back testing --please :)guide.
 

BNFTrader

Active Member
#8
2 points what i noticed
Code:
First

It looks like you are using unlimited size and it gives wrong effect add this code anywhere in the AFL and test again . . . 

[COLOR="Red"][B]SetPositionSize(1,4);[/B][/COLOR]


This will give you the result in number of points.
What does it mean? How it effects back testing --please :)guide.
This sets the size of every trade to constant 1 unit . . .

effectively the results show, the number of points the system will make . . .

with variable size as the equity grows, the size keeps on increasing showing unrealistic results

Thanks
 

mmca2006

Active Member
#9
This sets the size of every trade to constant 1 unit . . .

effectively the results show, the number of points the system will make . . .

with variable size as the equity grows, the size keeps on increasing showing unrealistic results

Thanks
but
"//PositionSize = MarginDeposit = 1;// " it also gives the number of points the system will make. What is the difference between this two,:confused: please....
 
Thread starter Similar threads Forum Replies Date
J Day Trading 0
A Forex 12
W AmiBroker 0
N Swing Trading 1
B AmiBroker 0

Similar threads