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

Re: [amibroker] I'm having a very hard time doing something that I think should be simple


  • To: Conrad Joach <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] I'm having a very hard time doing something that I think should be simple
  • From: Herman <psytek@xxxxxxxx>
  • Date: Thu, 26 Mar 2009 16:34:29 -0400

PureBytes Links

Trading Reference Links

Title: Re: [amibroker] I'm having a very hard time doing something that I think should be simple

do you have any code at all? It is easier to debug then to start from scratch :-)


Status() tells you which bar is visible and what the bar numbers (or indexes) are. 

You can write a small For() loop to give you your ten passes - however if you check the available afl functions you may find this is actually not needed.

If you want something to happen only once you use static variables.


herman





Thursday, March 26, 2009, 4:10:04 PM, you wrote:


> I'm just not understanding the way AB is evaluating AFL for a chart. Let me break it down.


> Let's say I have a database with 100 1 minute bars, 100 minutes of quotes.


> Now let's say I have a chart, and that chart is very narrow and only shows 10 bars worth of data.


> I write an AFL sript. I want to do a very simple thing.


> For every bar in the series of 100, I want to check if it's visible (meaning

> it's inside the 10 bar window that is viewable in the chart), I want to print

> the date and time of that bar. For this example let's say the chart is

> positioned at the end, showing bar 91-100.


> The script should send the date and time of bars 91-100 to the trace window.

> As far as I'm concerned there should only be *10* lines in the trace window,

> no more, no less. I guess this means setting the forward bar padding to 0, and the prior bars to 0.


> But here's the catch. These 100 bars are history. As soon as its loaded, bar

> 101 comes in across the wire. The script should only run *once* for bar 101.


> This is the paradigm I'm used to seeing in almost every other backtesting

> system. I don't want my AFL script to run 10 times for bars 92-101 when that

> 101st bar crosses the wire. I just want the last bar evaluated, and the ability to look back at prior bars.


> Where am I going wrong? Many thanks for any help you can provide.




> ------------------------------------


> **** IMPORTANT PLEASE READ ****

> This group is for the discussion between users only.

> This is *NOT* technical support channel.


> TO GET TECHNICAL SUPPORT send an e-mail directly to 

> SUPPORT {at} amibroker.com


> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at

> http://www.amibroker.com/feedback/

> (submissions sent via other channels won't be considered)


> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

> http://www.amibroker.com/devlog/


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-digest@xxxxxxxxxxxxxxx 

>     mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx


> <*> To unsubscribe from this group, send an email to:

>     amibroker-unsubscribe@xxxxxxxxxxxxxxx


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/





__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___