AmiBroker formula Language

#21
Re: AFL for importing NSE Bhavcopy

a great idea, my friend, praveen, to make AB to fetch its own data, dispensing with many convertor's available around. i feel it needs a bit of backward integration and incorporation of some user convenience.

1) the NSE cash market bhav copy is savable as a csv file in the format:
cm03NOV2006bhav.csv. you may use the same file naming format to the source file. this will avoid the trouble of renaming the file while saving to the AFL desired format.

the corresponding destination file name could be:
cm03NOV2006.csv, in a different directory to make identifiacation easy for the user. this will be more relevant when other segments also are added.

you may also give the option to user to retain/delete the source file after convertion.

2) the AFL may on it's own generate the file name from the current date & present it as a default, so that life becomes easier for the user.

3) similar AFL's may be generated for FnO segment also after release of the final version after considering all user opinions/requests, if any.

not withstanding above comments, it's firstly a NEW concept and deserves a pat. congratulations.

all the best.
murthymsr
Thanks Murthy and Saji for your comments.

Murthy, I will try to make the following improvements:

1. Reading the source file name to arrive at destination file name.
2. Even better: Taking source and destination filename using date functions, so that the user can just save the .csv file in one particular location and he needn't even give the source path and source file name.
3. Try to make everything UI based. ie presenting a graphical interface, so that the user needn't even touch the AFL code.
4. I will look into make incorporations, so that even we can do bulk import, like say importing one week, one month, one year.etc.. I haven't even seen such bhav copy...will definitely look into it and will provide the new AFL here.

Finally the AFL should work this way: User need to just download bhav copy and run the AFL in one click. Lets see...

Thanks,
Praveen.
 
Last edited:
#23
Hello Friends,

In AmiBroker is it possible to change built in levels of Indicators? With RSI commonly with RSI 30 & 70 lines are used. After plotting RSI you can change these levels with help of Properties>Axis & Grid. In AmiBroker few built in levels are available, but if you need any other level apart from these e.g. for RSI I want to use 40/60 levels. Is it possible to do? Can any body guide me about this?

Sudesh
 
#24
Hello Sudesh,

Simply open the edit formula function by right clicking on the indicator and paste these in the AFL and save it. Change the numbers as you want .

Plot(80,"80",colorRed,1);

Plot(80,"80",colorYellow,1);
Plot(70,"70",colorDarkRed,1);

Plot(60,"60",colorRed,styleDots);
Plot(50,"50",colorSeaGreen,1);
Plot(30,"30",colorDarkGreen,styleDots);
Plot(20,"20",colorBrightGreen,1);

Regards

Saji
 
#26
Hello Friends,

In AmiBroker is it possible to change built in levels of Indicators? With RSI commonly with RSI 30 & 70 lines are used. After plotting RSI you can change these levels with help of Properties>Axis & Grid. In AmiBroker few built in levels are available, but if you need any other level apart from these e.g. for RSI I want to use 40/60 levels. Is it possible to do? Can any body guide me about this?

Sudesh
Hi Sudesh,

I'm afraid whether i've understood your requirement correctly or not. Assuming that you want the upper and lower lines at some different leves, please find the corresponding AFL below. You can give any value in the paramerers window. If i'm wrong in the requirement, please let me know.

_SECTION_BEGIN("MyRSI");
SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
lowerLine = Param( "Lower line", 30, 10, 100, 1 );
upperLine = Param( "Upper line", 70, 50, 100, 1 );
lineColour = ParamColor("Line colour", colorBlue);
Plot(lowerLine, "Lower Line", lineColour );
Plot(upperLine, "Upper Line", lineColour );
Plot( RSI( periods), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

Hope this helps,
Praveen.
 

murthymsr

Well-Known Member
#27
Re: AFL for importing NSE Bhavcopy

Thanks Murthy and Saji for your comments.

Murthy, I will try to make the following improvements:

1. Reading the source file name to arrive at destination file name.
2. Even better: Taking source and destination filename using date functions, so that the user can just save the .csv file in one particular location and he needn't even give the source path and source file name.
3. Try to make everything UI based. ie presenting a graphical interface, so that the user needn't even touch the AFL code.
4. I will look into make incorporations, so that even we can do bulk import, like say importing one week, one month, one year.etc.. I haven't even seen such bhav copy...will definitely look into it and will provide the new AFL here.

Finally the AFL should work this way: User need to just download bhav copy and run the AFL in one click. Lets see...

Thanks,
Praveen.
dear praveen,

it's really great that you are taking the AFL one step beyond what i have wished.

date range, direct import and GUI functionality are good additions. and may be giving the option to user to import from BSE, for those members who use BSE data. (not me, of course!).

all the best.
murthymsr
 
#28
Re: AFL for importing NSE Bhavcopy

dear praveen,

it's really great that you are taking the AFL one step beyond what i have wished.

date range, direct import and GUI functionality are good additions. and may be giving the option to user to import from BSE, for those members who use BSE data. (not me, of course!).

all the best.
murthymsr
Hello Murthy and friends,

Although the AFL is ready now, its not upto what I initially thought of. Facing some problems. Please let me know any solutions for these:

1. To make it GUI enabled, i used Param(), Paramstring(), paramtoggle(),etc..
But these parameters actually keeps "remembering" the last values. ie. say i used paramtoggle() to select yes/no for original file deletion. If i'd choosed YES and the next time even if i select NO, it takes YES as the value!
Similarly for others like Paramstring(). I ran that AFL from both AA, as well as by double clicking from the workspace->chart. Same problem arises.

2. Is there any way to handle "check box" like scenario..It is needed to choose the desired sections. I tried one methods....but its very complex...using strextract() on comma separated string...

3. Not able to traverse a directory. No provision in AFL to take up this functionality - import multiple individual bhav copies.

To conclude, if we compromise on the GUI, the AFL is ready. Even we can add many others without GUI.

Praveen.
 
#30
Hi Friends,
Please Help Me out how to update database in BSE & F n O in Amibroker I have tried more time i could download properly so please if u all have any ideas please help me and how to see nifty chart in NSE Database tell if some one knows

Thanks DJ
 

Similar threads