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

Re: [amibroker] Re: Is it possible to avoid drawing of unnecessary data from database ?



PureBytes Links

Trading Reference Links



Hello,
 
The article
http://www.amibroker.com/kb/2008/07/03/quickafl/
clearly explains that SetBarsRequired() refers to VISIBLE BARS in the chart.
If you zoomed OUT so much that it covers area much larger than AA range, it will
obviously use MORE bars (i.e. VISIBLE bars).
 
So short answer is:
ZOOM IN the chart.
 
If you want not to display bars outside AA backtest range you can use
to find out whenever given bar lies inside AA backtest range and Plot Null if it isn't.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Wednesday, September 02, 2009 3:11 PM
Subject: [amibroker] Re: Is it possible to avoid drawing of unnecessary data from database ?

Hi Tomasz,

I have re-read the article.
This is the simple test script I'm playing with:

GraphXSpace = 5;
SetTradeDelays(0, 0, 0, 0);
SetChartOptions(0, chartShowArrows | chartShowDates | chartWrapTitle);

arrBuyLevel = Ref(HHV(High, 3), -1);
arrSellLevel = Ref(LLV(Low, 3), -1);

// Buy and sell levels and signals (stop orders)
BuyPrice = IIf(Open > arrBuyLevel, Open, arrBuyLevel);
SellPrice = IIf(Open < arrSellLevel, Open, arrSellLevel);

Buy = (High >= arrBuyLevel && Status("barinrange"));
Sell = (Low <= arrSellLevel && Status("barinrange"));
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Buy = IIf(Sell, 0, Buy);
Sell = IIf(Buy, 0, Sell);

Plot(Close, "Close", colorBlack, styleBar | styleNoTitle);

Plot(arrBuyLevel, "BuyLevel", colorGreen, styleLine | styleNoTitle);
Plot(arrSellLevel, "SellLevel", colorRed, styleLine | styleNoTitle);

PlotShapes(IIf(Buy && Status("barinrange"), shapeSmallCircle, shapeNone), colorGreen, 0, BuyPrice, 0);
PlotShapes(IIf(Sell && Status("barinrange"), shapeSmallCircle, shapeNone), colorRed, 0, SellPrice, 0);

SetBarsRequired(5, 0);

This is the screenshot if the whole ticker with an area of backtest (trade arrows are shown): Screenshot 
All I want is to work only with that part of graph that is inside the range I've specified in the backtester. Could you please explain how this can be achieved with such a simple test script ?

Thanks in advance.

Regards,
Roman.

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>
> Hello,
>
> Re-read the article.
>
> If you read the article carefully enough you will see that you should put that function at the END
> of formula if you don't want the functions you are using to add to bar requirements.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "roman_tatkin" Roman.Tatkin@xxx
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Tuesday, September 01, 2009 5:51 PM
> Subject: [amibroker] Re: Is it possible to avoid drawing of unnecessary data from database ?
>
>
> > Hi Tomasz,
> >
> > Thank you for the rapid answer. I have looked into the material you've sent, very clear and straight explanation. The only problem
> > is that even when I put SetRequiredBars(1000, 0) at the very beginning of my script nothing changes - I still see all 300000 bars
> > on the chart.
> >
> > 'Use QuickAFL' in the settings of backtester is checked. What I'm doing wrong ? May be you can provide some primitive script to
> > play with to understand how QuickAFL affects things ? Thanks in advance.
> >
> > Regards,
> > Roman.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" groups@ wrote:
> >>
> >> Yes http://www.amibroker.com/kb/2008/07/03/quickafl/
> >>
> >> Best regards,
> >> Tomasz Janeczko
> >> amibroker.com
> >> ----- Original Message -----
> >> From: "roman_tatkin" Roman.Tatkin@
> >> To: amibroker@xxxxxxxxxxxxxxx
> >> Sent: Monday, August 31, 2009 10:37 AM
> >> Subject: [amibroker] Is it possible to avoid drawing of unnecessary data from database ?
> >>
> >>
> >> > Say, I have a database with single ticker that has 300000 bars. I don't want to have all 300000 bars drawn all the time, last
> >> > 50000 bars are enough in 90% cases.
> >> >
> >> > Is it possible to specify the limits that AMI should work with ? Say, from 2006.01.01 to 2008.01.01 or something like that.
> >> >
> >> > That's possible when backtesting, however, I could not find such an option for general purpose drawing.
> >> >
> >> > Thanks in advance.
> >> >
> >> >
> >> >
> >> > ------------------------------------
> >> >
> >> > **** 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
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > **** 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
> >
> >
> >
>


__._,_.___


**** 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

__,_._,___