Need afl for effective strategy...

#1
hello friends,
i have been searching for afl i needed.
I got to know lots of concepts through this community.
I need help, if any one can help me in creating afl.

Strategy is:-

TEMA crossovers for 3 and 9 periods along with CCI value.

signal buy= 3 period TEMA is greater than 9 periods TEMA with CCI value>100

signal sell= 3 period TEMA is smaller than 9 Periods TEMA with CCI value<-100.



Its my humble request to all GENIUS of this community to help for making afl, also guidance is appreciated if am making mistake.
Thank you...
 
#2
HI SHYAM

In trading every new trader comes with lots of ideas and most of times,only 5% or less really do work.

First you need is initiative and willingness to test and declare-this is ok-this is not ok-sort of thing.

you can test following code just made so that you can test if your idea is really great one or it is one of those 95% ideas that readily give traders money to his enemies.

never trust anything new just like that.
test-minimum 300 or 500 times before you talk about it.

I dont know if you are serious type or careless type.
good luck
ford7k
--------------------------------------------
Here are 2 codes-one for upper chart
and one for lower chart
HTML:
//Strategy is:-

/*
TEMA crossovers for 3 AND 9 periods along with CCI value.

Signal Buy= 3 period TEMA is greater than 9 periods TEMA with CCI value>100

Signal Sell= 3 period TEMA is smaller than 9 Periods TEMA with CCI value<-100.
*/
GraphXSpace =5;
TEMA3 =TEMA(C,3);
TEMA9 =TEMA(C,9);
CCI14 =CCI(14);
Plot(TEMA3,"TEMA3",colorBlue,styleThick);
Plot(TEMA9,"TEMA9",colorRed,styleThick);

Plot(C,"C",COLORCYCLE,styleCandle);
Buy =(Cross(TEMA3,TEMA9) AND CCI14>100) ;
Sell =(Cross(TEMA9,TEMA3) AND CCI14 <-100);
//Buy =ExRem(Buy,Sell);
//Sell =ExRem(Sell,Buy);
//BUY SELL ARROWS
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
======================================================
HTML:
CCI14 =CCI(14);
Plot(CCI14,"CCI14",colorBlack,2+4);//HISTOGRAM
CCICOLOR = IIf(CCI14>100,colorGreen,IIf(CCI14<-100,colorDarkRed,colorGrey50));
PlotOHLC(100,100,-100,-100," ",CCICOLOR,styleCloud);
how the charts look like?

If you are a serious type let me know out of 100 signals how many are really worth using.
if you dont answer this query it shows you are not really committed type of new trader and that gets you automatic enrollment into 95% loosing traders group-no entry fees.
 
Last edited:
#3
hello ford7k,
Sir I truly appreciate your formula...
it works v well in 5 mins chart for bank nifty, i didnt calculate 100 signals but jst watched many recent signal...
note:- it works well particulary with a change in TEMA:- TEMA9,TEMA15 crossovers.


Many many salutes... sir..

Thank you v much...
 
#5
hello ford7k, may i know your goodname please??
I would like to make one refinement,
thing is,if you could make it as:-
1. when crossover occurs,signals are initiated and only after the confirmation from CCI,i.e >100 or <-100, signal are displayed on screen.
2. If prior signal is similar to current signal than current signal is not necessory, i mean its ok if it is not displayed.

I would like to tell you, it works very will in semi volatile scrips.
EOM account will be in plus.
 
#6
hi

First thing
why so many tests are needed?
most traders have no time for testing but have lots of it for trading.
since they quickly see, just 1 1/2 scenarios,their success also goes very limited.
point is
do you know your system fully well or just 5% only?

Are you always in a hurry to use an untested or improperly tested system for live trading like those 95% loosers?


becoz market behaves in many many ways. when more tests done we see more different scenarios and whether the formula works in all those scenarios or not.
at least if one knows under what scenarios this formula fails,then one can avoid trading in such times thus avoid big losses.
This above part is for smart traders.

here is chart.
rest you think for yourself.
 
#7
Hi again,
Sir you are absolutely right!!!
As i said i am learning lot through this community and my willingness is same too.
many different kinds of indicators available in todays time but all fall short somewhere bcoz price behaviour is not going to remain similar always.
here what i tried is, used moving averages for trend indication and to filter that used CCI.
Also would be glad to have your opinion on same.

thank you.
 
#8
Dear shyam777
i got this AFl from ami broker library site and i like you AFL very much and its help me lots.. now if you don't mind...would you please help me to solve this Afl to modify something...what i actually need all i describe in this jpg picture which i attached here and i know this is very easy to solve for you ....may god bless you.

Regards

Rinku

AFL code:
_SECTION_BEGIN("Williams %R with 9 period signal line");
//------------------------------------------------------------------------------
//
// Formula Name: Williams %R with 9 period signal line
// Author/Uploader: Anthony Faragasso
// E-mail: [email protected]
// Date/Time Added: 2001-11-11 07:31:44
// Origin:
// Keywords:
// Level: basic
// Flags: indicator
// Formula URL: http://www.amibroker.com/library/formula.php?id=133
// Details URL: http://www.amibroker.com/library/detail.php?id=133


/* Williams %R and 9 day Mov.avg.*/
/* by Anthony Faragasso */
MaxGraph =10;

tr=Param("tr",9,1,60,1);

R = ((HHV(H,tr) - C) /(HHV (H,tr) -LLV (L,tr))) *-100;
Graph0 = r;
Graph1 =-30;
Graph2 =-70;
Graph3 =-90;
Graph4 =-10;
Graph5=MA(R , 9);
Graph5Style = 1+4;
Graph5Color =7;
Graph0Style=1+4;
Graph1Style =Graph2Style= 1;
Graph3Style =Graph4Style =4;
Graph3Color = Graph4Color =6;
Graph2Color = Graph1Color =10;




Plot(-40,"",colorGreen,styleLine);
Buy= R>-30 ;
Sell= R<-40 ;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);
PlotShapes( shapeUpArrow*Buy , colorGreen ,0);
PlotShapes( shapeDownArrow*Sell , colorWhite ,0);
/*x = BarsSince( Cross( r, MA( r, 9)));*/
/*y = BarsSince( Cross( MA(r, 9), r));*/
/*Graph8 = ( x == 0 OR y == 0 ) * 30;*/

Title =Name() + " -Williams %R: " +" % R Line " +"("+ WriteVal ( Graph0,format=1.2)+")"+ " Signal Line " + ""+"("+WriteVal(Graph5,format=1.2)+")" +" , " + Date( );
_SECTION_END();
 
#9
Dear shyam777
i got this AFl from ami broker library site and i like you AFL very much and its help me lots.. now if you don't mind...would you please help me to solve this Afl to modify something...what i actually need all i describe in this jpg picture which i attached here and i know this is very easy to solve for you ....may god bless you.

Regards

Rinku

AFL code:
_SECTION_BEGIN("Williams %R with 9 period signal line");
//------------------------------------------------------------------------------
//
// Formula Name: Williams %R with 9 period signal line
// Author/Uploader: Anthony Faragasso
// E-mail: [email protected]
// Date/Time Added: 2001-11-11 07:31:44
// Origin:
// Keywords:
// Level: basic
// Flags: indicator
// Formula URL: http://www.amibroker.com/library/formula.php?id=133
// Details URL: http://www.amibroker.com/library/detail.php?id=133


/* Williams %R and 9 day Mov.avg.*/
/* by Anthony Faragasso */
MaxGraph =10;

tr=Param("tr",9,1,60,1);

R = ((HHV(H,tr) - C) /(HHV (H,tr) -LLV (L,tr))) *-100;
Graph0 = r;
Graph1 =-30;
Graph2 =-70;
Graph3 =-90;
Graph4 =-10;
Graph5=MA(R , 9);
Graph5Style = 1+4;
Graph5Color =7;
Graph0Style=1+4;
Graph1Style =Graph2Style= 1;
Graph3Style =Graph4Style =4;
Graph3Color = Graph4Color =6;
Graph2Color = Graph1Color =10;




Plot(-40,"",colorGreen,styleLine);
Buy= R>-30 ;
Sell= R<-40 ;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);
PlotShapes( shapeUpArrow*Buy , colorGreen ,0);
PlotShapes( shapeDownArrow*Sell , colorWhite ,0);
/*x = BarsSince( Cross( r, MA( r, 9)));*/
/*y = BarsSince( Cross( MA(r, 9), r));*/
/*Graph8 = ( x == 0 OR y == 0 ) * 30;*/

Title =Name() + " -Williams %R: " +" % R Line " +"("+ WriteVal ( Graph0,format=1.2)+")"+ " Signal Line " + ""+"("+WriteVal(Graph5,format=1.2)+")" +" , " + Date( );
_SECTION_END();

the image link is here: http://imageshack.com/a/img833/5923/4yxk.png
 
Last edited: