PureBytes Links
Trading Reference Links
|
Hello,
I have brought up this problem before, but I bring it up again,
because it has not been solved yet, and perhaps like with the recent
solution to sending the F5 refresh chart from AFL (that Bruce kindly
provided), someone has learned a clever solution to this problem by now.
The biggest frustration I have right now, and for years, is that I
have no way to reset the setBarsRequired() back to a smaller number.
You can set it to larger numbers, but it is a one way trip. It uses
the largest number it has seen since starting up. It is as if it is
set in a static variable and appears to behave like this:
function mySetBarsRequired(pastBars)
{
PastBarsRequired = Max( StaticVarGet("PastBarsRequired", pastBars );
StaticVarSet( "PastBarsRequired", PastBarsRequired );
SetBarsRequired( PastBarsRequired, 0 );
}
The only way to get is back to a smaller number is to wipe out all the
static variables by restarting AB. Applying an edit also clears it.
I run the number of bars in my chart up and down a lot from 5,000 for
real time trading up to 200,000 on a frozen database for quick
backtesting of up to 1.5 years worth of 1 minute bars on futures.
Since my trades last 5 minutes to an hour, this is the equivalent of
backtesting 50 years of data for an EOD trader.
I am under a second when I start at 5000, then my formula goes to 17
seconds at 200,000 bars (for a big picture backtest. Then when I run
it back down to 5,000 for speed it takes 5 seconds to execute because
all the internal array operations are still using 200,000 bars, even
though all my loop operations are only working on 5,000 bars.
If anyone has a clever way to let me reset this back to a lower
number, I would love to know it. Right now, I think it would require
restarting the formula from scratch like it does after a sham edit. I
understand the reason why the SBR numbers are peak detecting in normal
operation --so that the first pass through the formula can gather up
the maximum number of bars for QuickAFL. However, since SBR at the
end of the formula overrides QuickAFL, it seems that it should be
allowed to make it smaller.
Tomasz, if you will, please give a little explanation of what is going
on internally that makes this so hard to reset to a lower number.
Best regards,
Dennis
------------------------------------
**** 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/
|