[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Help file help (WAS) FILTER questions.



PureBytes Links

Trading Reference Links



Thanks for the help! Much appreciated...Graham <gkavanagh@xxxxxxxxxxxxx> wrote: 
Here is the basic AFL code for plotting it, just add to a new IB windowPD = c - ref(c,-1);Plot(pd, "price diff", colorblue, styleline);Cheers,Grahamhttp://groups.msn.com/ASXShareTradinghttp://groups.msn.com/FMSAustralia-----Original Message-----From: joe run [mailto:run_for_your_life2003@xxxxxxxxx] Sent: Monday, 15 September 2003 11:00 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] Help file help (WAS) FILTER questions.I have a question on doing a script. I'm new at this??Subtract the stocks high close of the today -the high close of yesterday toget the difference to plot.Price Difference = ( today high close - yesterday high close)Plot= The price differenceHow do you
 write this in script???William Peters <williampeters@xxxxxxxxxxxx> wrote:Yuki,I think you have got the posts mixed up. The only part of that post thatcame from me is as follows:WP> This is a perfect opportunity for AFL beginners to learn byWP> DOING, as Ron said just having to get it all down in a readableWP> fashion is an effort that will pay dividends."mrdavis9" was the poster of that information..Regards,William Peterswww.amitools.com-----Original Message-----From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx]Sent: September 14, 2003 3:59 PMTo: William PetersSubject: [amibroker] Help file help (WAS) FILTER questions.Hi William,A couple of quick comments in line below . . .Monday, September 15, 2003, 5:53:50 AM, you wrote:WP> This is a perfect opportunity for AFL beginners to learn byWP> DOING, as Ron said just having to get it
 all down in a readableWP> fashion is an effort that will pay dividends.WP> Below, I have written a non-techie answer to a post by Glen whichWP> asked about the setting n=1 in AA.WP> Also, please suggest changes if you have idea's of  how to makeWP>this description clearer.WP> =======================================================================WP> When you set n=1, AA will check only the latest dated bar in yourWP> database in order to see if your AFL conditions has been met onWP> only the latest dated bar.  However, while Amibroker is executingWP>  your particular AFL instructions, it still needs toWP> retrieve  data from earlier dated bars in order to produceWP> things  such as moving average calculations, and otherWP> calculations  that will be required by your AFL coding.     I would change "latest dated bar"
 (above) to "most recent bar".  I amalso not sure that the additional information about what AB is doingwhile it is executing the instruction is relevant.  It is nice tohave, perhaps, but it also could be confusing, because I think somepeople might take the following logic after reading it: "Oh, it needsto retrieve data from earlier bars, so how the heck do I make surethat it can do that?"WP> When you set n=10, Amibroker will follow  exactly theWP> same procedure that it did when you  set n=1. The only differenceWP> is , Amibroker will first check the bar that is positioned 10WP> periods back from the present bar.  A  period will be in seconds,WP> minutes, hours, days, months, or whatever you  happen toWP> have available in your database for Amibroker to  check.   OnceWP> Amibroker is through checking the 10'th bar back, itWP> moves forward to check
 the 9'th bar, then on to the 8'thWP> bar,  and so on, till it finally checks the n=1 bar last.WP> ====================================================================I will give my shot here:In the AA window, what does 'n' equal?'N' equals the number of most recent bars that you want to analyze inan AA analysis.When you set n=1 in the AA window, the analysis will apply only tothe most recent bar in your database.  If your database is daily, itwill apply only to the most recent day.  If your database usesanother time period (5-minute bars, for example), the analysis willapply only to the most recent 5-minute bar.  Whatever the period oftime for the bars in your database, the number you specify as 'n'will tell AA to analyze that number of most recent bars in youranalysis.If you set n=10 in the AA window, the analysis will first be done onthe 10th most recent bar, then the
 9th most recent, etc., until themost recent bar (n=1) is done.  So in this case, the analysis wouldbe done 10 times . . . for each issue that you are analyzing.  If youanalyze 1000 issues, the analysis would be done 10,000 times.Tip:If the condition you are filtering for (the output you want to see)is likely to be frequently true, setting 'n' to a large number andincluding a large number of issues to be tested will likely produce avery large output. Realize that every bar for every issue where thecondition was true during the period of 'n' will be output. If youtest 1000 issues setting n=25, and the condition is likely to be truefor approximately every 5th bar (20 percent true), you can expect anoutput of approximately 5,000 lines (1000 x 25 x 20%).Practical application:You have an EOD buy or sell signal that you want to test for eachnight: You create an exploration and run it each night, including
 allthe issues you want to test for, and setting n=1 to see if thatcondition was true for any of those issues on the most recent bar.You want to generate a list of daily prices for the past week to sendto a friend:  You create an exploration that will output the pricedata, include all the issues you want the data for, and set n=5 (thisassumes a daily database).  The output will be five lines for eachissue, the five most recent bars.======I'm sure somebody can improve upon this.  But what I would key in onis keeping the basic explanation as clutter free as possible, thenincluding some kind of tip (might be a warning, too) and a practicalapplication.YukiSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
 href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at:http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at:<A
 href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Do you Yahoo!?Yahoo! SiteBuilder - Free, easy-to-use web site design software Yahoo! Groups SponsorADVERTISEMENTSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at:http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software






Yahoo! Groups Sponsor


  ADVERTISEMENT 









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.