Help: Need AFL for SavantJi's System

docvijay4u

Well-Known Member
#21
Thanks A Lot Pkgmtnl. Formula Is Now Corrected And Checked Twice. I Am Attaching Zip File Of All Four Afl We Discussed.

One Small Request 'Please No Sir Only Doc Or Vijay Is Fine.'

Thanks.:)

Sir, is it possible your to attach this file of AFL as attachment? so that it can be downloaded........! thanx with humble regrds
Sir, it gives syntax error at last two lines for BUY and SELL....
Can U please correct it?? or attach the AFL file itself
 

itzarvind

Well-Known Member
#22
Doc,

Can u Please share your screenshot of "Automatic Analysis"

Do we have to set any special options.

If we have to select any option do let me know.

Attached the screenshot of My "Automatic Analysis" for your reference.

Let me know if i have to change anything .. :)

Regards,
Arvind
 
Last edited:

docvijay4u

Well-Known Member
#23
Yes Arvind That Is The Same Window Just Pick AFL, Apply To All Symbols, Choose Date Range, Hit Scan. That's All.

Thanks.:)

Doc,

Can u Please share your screenshot of "Automatic Analysis"

Do we have to set any special options.

If we have to select any option do let me know.

Attached the screenshot of My "Automatic Analysis" for your reference.

Let me know if i have to change anything .. :)

Regards,
Arvind
 

itzarvind

Well-Known Member
#24
Doc / Savant,

Okie, using our AFL, which says

Buy = Cross(MA(C, 5), MA(C, 6));
Sell= Cross(MA(C, 6), MA(C, 5));

But, why dont we get all signals in the chart.

At some places we are getting the signal, but at some places, we dont get it,

Attaching the chart for your reference.

Regards,
Arvind
 
Last edited:

docvijay4u

Well-Known Member
#25
Problem Might Be In Date Range You Selected, Try Selecting Intial String 1-3 Month Back And End String To The Date When You Last Updated Ami Database.

Like Initial String 1 Mar 2009
End String 4 Jun 2009

Actually Your Looking For Past Trigger So You Have To Keep Wide Range Of Period For Scanning Database, For Follow-Up You Just Scan Database For Current Date. I Think This Should Slove You'r Problem. (Buy Trigger Will Be Shown On 18/05/09 For Unitech).

Thanks.:)

Doc / Savant,

Okie, using our AFL, which says

Buy = Cross(MA(C, 5), MA(C, 6));
Sell= Cross(MA(C, 6), MA(C, 5));

But, why dont we get all signals in the chart.

At some places we are getting the signal, but at some places, we dont get it,

Attaching the chart for your reference.

Regards,
Arvind
 

djsinha

Active Member
#26
Hi Doc

Sorry for loosing touch for so many days. Hope you are fine. I went through all the previous posts. You have made a very good AFL. Nice work. It'll greatly reduce the load of manual work of scanning a whole lot of stocks and search for crossovers.

@ All: I've seen a very interesting observation. When there is a 5,6 crossover coupled with close above 5 or 6 day SMA, the potential for upmove increases. By close I mean today's candle should crossover the 5 or 6 day SMA from below. I haven't backtested it so rigorously. It's just an observation. If anybody can throw some lights on this or has done some work in this direction, please share.

And Savant, Doc, Itzarvind, Pkgmtnl, Dubai33 please verify this observation of mine and kindly share any issues related to this. If we decide then this condition can also be appended into the AFL prepared by Doc.

Thanks and regards
DJ
 

docvijay4u

Well-Known Member
#27
AFL Updated With Little Improvement:

****://r a p i dshare.com/files/312290545/My_Indicator.afl.html

Code:
SetChartOptions(0, chartShowDates | chartWrapTitle | chartShowArrows);

_SECTION_BEGIN("Background");
SetChartBkColor(ParamColor("Background Color", colorBlack));
_SECTION_END();

_SECTION_BEGIN("Chart");
Plot(C, "Chart Style", ParamColor("Chart Color", colorWhite), ParamStyle("Chart Type", styleCandle, maskPrice));
_SECTION_END();

_SECTION_BEGIN("MA 1");
P1 = ParamField("Price Field", 3);
Periods1 = Param("Periods", 5, 2, 100, 0.5);
Plot(MA(P1, Periods1), _DEFAULT_NAME(), ParamColor("Color", colorRed), ParamStyle("Style", styleLine));
_SECTION_END();

_SECTION_BEGIN("MA 2");
P2 = ParamField("Price Field", 3);
Periods2 = Param("Periods", 6, 3, 200, 1);
Plot(MA(P2, Periods2), _DEFAULT_NAME(), ParamColor("Color", colorGreen), ParamStyle("Style", styleLine));
_SECTION_END();

_SECTION_BEGIN("Bollinger Band");
P3 = ParamField("Price Field", 3);
Periods3 = Param("Periods", 9, 2, 100, 1);
Width = Param("Width", 2, 0, 10, 0.5);
Color = ParamColor("Color", colorBlue);
Style = ParamStyle("Style", styleLine);
Plot(BBandTop(P3, Periods3, Width), "BBTop" + _PARAM_VALUES(), Color, Style);
Plot(BBandBot(P3, Periods3, Width), "BBBot" + _PARAM_VALUES(), Color, Style);
_SECTION_END();

MA1 = MA(P1, Periods1);
MA2 = MA(P2, Periods2);
Buy = Cross(MA1, MA2);
Sell = Cross(MA2, MA1);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorYellow,0,Graph0);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorOrange,0,Graph1);
Thanks.:)
 

bandlab2

Well-Known Member
#28
doc,

pl add these lines at the end to get auto exploration

now, can u point me to the savant sir's original thread on this method ? i need to understand the system better so that i can check if the afl logic is correct or not ?

also savant sir can throw some light on avoiding whips or reduce the noice etc. when i scanned for today till now i am getting atleast 4 signals for each stock. i know today is a ranged market and not much movement so far (expiry is 1.5 hr away). is there any way to reduce the noice and get quality signals. i am sorry i didnt read the original post , so my questions are already answered there
 

docvijay4u

Well-Known Member
#29
Hello Bandlab On Following Threads System Is Discussed:

http://www.traderji.com/equities/10035-stocks-keep-close-eye.html

System Discussed Is For Swing/Long Term Trading. As Far As AFL Is Concered It Is In Very Basic Form and Need Lots Of Tweaks. Any Suggestions To Avoid Whipsaw Are Welcome.

Thanks.:)

doc,

pl add these lines at the end to get auto exploration

now, can u point me to the savant sir's original thread on this method ? i need to understand the system better so that i can check if the afl logic is correct or not ?

also savant sir can throw some light on avoiding whips or reduce the noice etc. when i scanned for today till now i am getting atleast 4 signals for each stock. i know today is a ranged market and not much movement so far (expiry is 1.5 hr away). is there any way to reduce the noice and get quality signals. i am sorry i didnt read the original post , so my questions are already answered there
 
#30
hi i want to make an afl using following: condition BUY = close is grater than 20 period bollinger band bbandtop, also when 20 period bollinger band bbandtop is above 80 period upper bollinger band bbandtop period.
condition SELL = close is lower than 20 period bollinger band bbandtop, also when 20 period bollinger band bbandtop is above 80 period upper bollinger band bbandtop period
 

Attachments

Similar threads