I can Create AFL but Need Strategy

jsb2012

Active Member
#81
Plot(SUPPORT1,"SUPPORT1",colorBrightGreen,styleDots);
Plot(RESIST1,"RESIST1",colorRed,styleDots);
Plot(RESQ,"RESQ",colorRed,styleDashed,styleThick);
Plot(SQ,"SQ",colorBrightGreen,styleDashed,styleThick);
Plot(SUP,"SUP",colorBrightGreen,styleLine);
Plot(RES,"RESI",colorRed,styleLine);


Plot(RDF,"RDF",colorBlack,styleDots);
Plot(SDF,"SDF",colorBlue,styleDots);
Plot(RDH,"RDH",colorGreen,styleDots);
Plot(SDH,"SDH",colorTurquoise,styleDots);
Plot(RDQ,"RDQ",colorBrown,styleDots);
Plot(SDQ,"SDQ",colorPink,styleDots);

NOW WHERE AND HOW TO ADD \n PLS SHOW. I WANT THE TOP 6 IN THE FIRST LINE AND BOTTOM 6 IN THE SECOND LINE. THANKS IN ADV.
 
#82
Code:
Plot(SUPPORT1,"SUPPORT1",colorBrightGreen,styleDots);
Plot(RESIST1,"RESIST1",colorRed,styleDots);
Plot(RESQ,"RESQ",colorRed,styleDashed,styleThick);
Plot(SQ,"SQ",colorBrightGreen,styleDashed,styleThick);
Plot(SUP,"SUP",colorBrightGreen,styleLine);
Plot(RES,"RESI",colorRed,styleLine);


Plot(RDF,"\nRDF",colorBlack,styleDots);
Plot(SDF,"SDF",colorBlue,styleDots);
Plot(RDH,"RDH",colorGreen,styleDots);
Plot(SDH,"SDH",colorTurquoise,styleDots);
Plot(RDQ,"RDQ",colorBrown,styleDots);
Plot(SDQ,"SDQ",colorPink,styleDots);

- - - or - - -

Code:
Plot(SUPPORT1,"\nSUPPORT1",colorBrightGreen,styleDots);
Plot(RESIST1,"RESIST1",colorRed,styleDots);
Plot(RESQ,"RESQ",colorRed,styleDashed,styleThick);
Plot(SQ,"SQ",colorBrightGreen,styleDashed,styleThick);
Plot(SUP,"SUP",colorBrightGreen,styleLine);
Plot(RES,"RESI",colorRed,styleLine);


Plot(RDF,"\nRDF",colorBlack,styleDots);
Plot(SDF,"SDF",colorBlue,styleDots);
Plot(RDH,"RDH",colorGreen,styleDots);
Plot(SDH,"SDH",colorTurquoise,styleDots);
Plot(RDQ,"RDQ",colorBrown,styleDots);
Plot(SDQ,"SDQ",colorPink,styleDots);
Cheers
::thumb::
 
#83
Will you please create an afl which gives buy/sell signals on hourly chart after closing a 5 minute bar above pivot level a buy signal/below a sell signal. The buy sell arrows should appear on today pivot levels only.
 
#84
Will you create AFL for me. i have very good system using it for last 5 months. last are satisfactory. If you can create AFL for me.
in commission you will get very good system and guidance on how to use it. because that afl only is not everything. there is trick to use it. if anyboby can create afl for me. please reply.
 
#86
You may try entry when slope of 9SMA is more than p% of 9SMA per minute, where p can be defined by the user. For example, if 9SMA=Rs. 101/- and 1 minute ago it was Rs. 100/-, then change (=slope) per minute of 9SMA= 100-101=-1, which is 1% in this case, and therefore p=-1 (Sale). You can exit when 3SMA and 6SMA crossover happens. You can backtest this strategy.

If you decide to write this, please give me a copy of the afl which I don't know how to write and please PM me or give a message to 09748498985.
 
#87
Friends
As i have good knowledge of programming, So i can Create AFL for the given strategy but I dont know much about Technical Analysis.
So if you have a good technical strategy then share with me and i will code it for our benifit and we can discuss everything here
sir,
pl create code for the following intraday startegy.
time frame 1 min .
h9151000= highest value between time interval 9.15 to 10.00.
l 9151000= lowest value between time interval 9.15 to 10.00

find for every half an hour.highest and lowest price.for that half an hour only .
we will get 10 high and 10 low till 3 pm.

buy when current price cross previous half an hours(fixed time interval) high.
sell when current price cross previous half (fixed time interval)an hours low.

working fine with intraday nifty.
pl prepare afl. [email protected]
thanks
 
#88
i need strategies for the following conditions..

-Indicators: EMA9 and EMA26 and DMI (Directional Movement Indicator with ADX)

Conditions:

GO LONG WHEN:
- EMA9 has crossed over EMA26
- DI+ >= 25
- ADX >= should be 20 to 35
- ADX is in between DI+ and DI-

EXIT LONG WHEN:
- EMA26 has crossed EMA9 AND
- DI- is higher than DI+
Also Reentering position also need

GO SHORT WHEN:
- EMA26 has crossed EMA9
- DI- >= 25
- ADX >= should be 20 to 35
- ADX is in between DI- and DI+

EXIT SHORT WHEN:
- EMA9 has crossed EMA26 AND
- DI+ is higher than DI-
Reentering position also need

WHAT TO IGNORE:
- While in Long Position: DI+ and DI- Cross-overs while the EMA9 is still on top of EMA26
- While in Short Position: DI+ and DI- Cross-overs while the EMA26 is still on top of EMA9

Buy, Sell arrow need and different symbols need for exit positions, if possible add message board.
Hi,
here's a quick code to get you started.

AvgFast=MA( Close, 9 );
AvgSlow=MA( Close, 26 );

myPDI=PDI (14); //Plus Directional Movement Indicator
myMDI=MDI (14); //Minus Directional Movement Indicator

myADX=ADX (14);

//Plot(AvgFast,"AvgFast",colorBlack, styleLine|styleDashed | styleThick);
//Plot(AvgSlow,"AvgFast",colorGreen, styleLine|styleDashed | styleThick);
Plot(myPDI,"myPDI",colorBlue, styleLine|styleLine);
Plot(myMDI,"myMDI",colorRed, styleLine|styleLine);
Plot(myADX,"myADX",colorBlue, styleLine|styleDashed | styleThick);


//entry Criteria Long
CrLo1=Cross( AvgFast, AvgSlow); //EMA9 has crossed over EMA26
CrLo2=myPDI >= 25; //DI+ >= 25
CrLo3=myADX >= 20 AND myADX <=35; //ADX >= should be 20 to 35
CrLo4=myADX > myMDI AND myADX < myPDI; //ADX is in between DI+ and DI-


Buy=CrLo1 AND CrLo2 AND CrLo3 AND CrLo4;

PlotShapes( Buy * shapeUpTriangle, colorBrightGreen, 0);
 

johnnypareek

Well-Known Member
#90
need EMA calculation . we need sell condition, but here only buy condition
Modified and short added. tgt pending.

HTML:
/*-Indicators: EMA9 and EMA26 and DMI (Directional Movement Indicator with ADX)

Conditions:

GO LONG WHEN:
- EMA9 has crossed over EMA26
- DI+ >= 25
- ADX >= should be 20 to 35
- ADX is in between DI+ and DI-

EXIT LONG WHEN:
- EMA26 has crossed EMA9 AND
- DI- is higher than DI+
Also Reentering position also need

GO SHORT WHEN:
- EMA26 has crossed EMA9
- DI- >= 25
- ADX >= should be 20 to 35
- ADX is in between DI- and DI+

EXIT SHORT WHEN:
- EMA9 has crossed EMA26 AND
- DI+ is higher than DI-
Reentering position also need

WHAT TO IGNORE:
- While in Long Position: DI+ and DI- Cross-overs while the EMA9 is still on top of EMA26
- While in Short Position: DI+ and DI- Cross-overs while the EMA26 is still on top of EMA9

Buy, Sell arrow need and different symbols need for exit positions, if possible add message board.

*/

_SECTION_BEGIN("Price");

GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
AvgFast=EMA( Close, 9 );
AvgSlow=EMA( Close, 26 );

myPDI=PDI (14); //Plus Directional Movement Indicator

myMDI=MDI (14); //Minus Directional Movement Indicator

myADX=ADX (14);

Plot(AvgFast,"AvgFast",colorBlack, styleLine|styleDashed | styleThick);
Plot(AvgSlow,"AvgFast",colorGreen, styleLine|styleDashed | styleThick);
Plot(myPDI,"myPDI",colorBlue, styleLine|styleLine|styleOwnScale);
Plot(myMDI,"myMDI",colorRed, styleLine|styleLine|styleOwnScale);
Plot(myADX,"myADX",colorBlue, styleLine|styleDashed | styleThick|styleOwnScale);


//entry Criteria Long
//CrLo1=Cross( AvgFast, AvgSlow); //EMA9 has crossed over EMA26

CrLo1= AvgFast> AvgSlow; //EMA9 has crossed over EMA26
CrLo2=myPDI >= 25; //DI+ >= 25
CrLo3=myADX >= 20 AND myADX <=35; //ADX >= should be 20 to 35
CrLo4=myADX > myMDI AND myADX < myPDI; //ADX is in between DI+ and DI-

//ShortCriteria Long
//CrLo5=Cross( AvgSlow, AvgFast); //EMA26 has crossed over EMA9

CrLo5= AvgSlow> AvgFast; //EMA26 has crossed over EMA9
CrLo6=myMDI >= 25; //DI- >= 25
CrLo7=myADX >= 20 AND myADX <=35; //ADX >= should be 20 to 35
CrLo8=myADX > myPDI AND myADX < myMDI; //ADX is in between DI+ and DI-



Buy=CrLo1 AND CrLo2 AND CrLo3 AND CrLo4;
Sell=0;
Short=CrLo5 AND CrLo6 AND CrLo7 AND CrLo8;
Cover=0;

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

PlotShapes( Buy * shapeUpTriangle, colorBrightGreen, 0); 
PlotShapes( Short * shapeDownTriangle, colorRed, 0);
 

Similar threads