[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-07 Thread bistrader
Thanks again to both of you. I did study both. Must admit that I will have to study one that reads csv file a few more times to understand. I did apply and it works just fine. As a learning experience, I created the following. It does not read from a csv file which is what I wanted, but I t

Re: [amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-07 Thread Ton Sieverding
Hi, I like really like this one. Something for the FED -) 12/01/2007,12/31/2010 Regards, Ton. - Original Message - From: notanaiqgenius To: amibroker@yahoogroups.com Sent: Wednesday, July 07, 2010 12:05 AM Subject: [amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-06 Thread notanaiqgenius
Hi BisTrader, No need to study it (unless you want to). It should work if you just do the following: 1) copy my code to new afl document. 2) create this directory: c:\abTestData\ 3) with Notepad copy and paste the following dates into a file and save it as a .csv file in that abTestData directo

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-06 Thread bistrader
Wow. Need to study. More work than expected. Most is ready the csv file and converting to 1s and 0s it appears. Thanks for sharing. --- In amibroker@yahoogroups.com, "notanaiqgenius" wrote: > > Sebastian and bistrader, > > That is a very clean, fast, and simple solution, Sebastian. I actual

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-06 Thread bistrader
Thanks. Appreciated! --- In amibroker@yahoogroups.com, "sebastiandanconia" wrote: > > Using a csv file was the way I solved this problem. The AB code is short and > simple that way. > > I took the recession/expansion dates from: > > http://www.nber.org/cycles.html > > ...then created a csv

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-05 Thread notanaiqgenius
Sebastian and bistrader, That is a very clean, fast, and simple solution, Sebastian. I actually prefer your method most of the time. However, I kind of got carried away and wrote it the hard way reading a csv file directly with the string functions. This code could be used to plot user-defined p

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-04 Thread sebastiandanconia
Using a csv file was the way I solved this problem. The AB code is short and simple that way. I took the recession/expansion dates from: http://www.nber.org/cycles.html ...then created a csv file" named "^Recession Ribbon" (with the data,open,high,low,close,volume,open interest format) with "

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-04 Thread bistrader
Paul, Thanks. Two items. First, I would like the overlay to extend from the top to the bottom of the chart. Is there a way to do this? I remember seeing a chart someplace that did this but can not find it. Second, I would like to place the state date and end date for each recession in a cs

[amibroker] Re: PLOT OVERLAY AFL FOR RECESSIONS

2010-07-03 Thread notanaiqgenius
Hi, I made this indicator for you. Try applying as an overlay. Let me know if that works for you. Paul - //RD stands for recession date StartRD1 = 1050101; EndRD1 = 1050631; StartRD2 = 1000401; EndRD2 = 1030101; StartRD3 = 1070701; EndRD3 = 1090301; isRecession = (DateNum()>=StartR