PureBytes Links
Trading Reference Links
|
Good question. Pad and align does not appear to help. I have had this issue in paste as well and did not resolve it.
--- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx> wrote:
>
> what you might try (not sure if it will work): In the backtester settings window use: "Pad and align all data to refence symbol". Then choose a symbol used for reference of which you have many data and is also considered as a "benchmark" (for instance ES for futures),
>
> Else, make sure that your active window contains the "benchmark" data.
>
> rgds, Ed
>
>
>
>
> ----- Original Message -----
> From: levibreidenbach
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Tuesday, October 27, 2009 12:26 AM
> Subject: [amibroker] Re: BarCount with foreign symbol
>
>
> Hi Rob:
>
> I've tried that. SetBarsRequired() at beginning of code.
>
> Then, when I set foreign, it still only utilizes 200 bars of the 1104.
> At least I assume this is what is happening. Whatever the issue is, calculation comes out different depending on active symbol.
>
> Let me explain what I'm doing:
>
> Using FastTrack data, I have symbol for NYSE Advances and symbol for NYSE Declines. I am trying to calculate A/D Line from these two symbols.
>
> Here's the code:
>
> a = Foreign( "$NADV", "Close" );
> d = Foreign( "$DECL", "Close" );
>
> ad[0] = ( a[0] - d[0] ) + 10000;
>
> for ( i = 1; i < BarCount; i++ )
> {
>
> ad[i] = ( a[i] - d[i] ) + ad[i-1];
>
> }
>
> The problem I have is depending on which symbol is the active symbol, the calculation comes out different. I'm assuming this is because not all symbols have same amount of history.
>
> I would like to be able to calculate this A/D Line same no matter what symbol in use as I use it for filter in backtests.
>
> Thanks for help
>
> Levi
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Rob" <sidhartha70@> wrote:
> >
> > You can use SetBarsRequired() and make it do whatever you want...
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "levibreidenbach" <levib1@> wrote:
> > >
> > > If the active symbol has a barcount of 200, and I then use setforeign function to work with another array (which has a barcount of 1104), will I be able to access all 1104 bars, or only the 200 because that is what is initially loaded?
> > >
> > > The reason I would like to access all bars is to loop through them and do some calculations that I would like to be the same for all symbols. These calculations are based on a specific starting value (say 10,000), and if I start calculation at the 'zero' bar and barcount is different for each symbol, the calculation is always different for different symbols.
> > >
> > > I know I didn't explain this too well, but any help would be appreciated. If I can clarify anything, let me know.
> > >
> > > Thanks
> > >
> > > Levi
> > >
> >
>
------------------------------------
**** 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/
|