PureBytes Links
Trading Reference Links
|
Weekly has fewer bars than daily, but ends at the last bar, so you
have to start calculating from the first bar in the weekly array, not
i=1; but i=firstbar;
firstBar can be calculated, or you can start at 1, but ignore all
null data at the beginning of the array:
function calcu(array)
{
for (i=1; i<BarCount;i++)
{
if(array[i] != Null)
{
...........
}
}
}
On Oct 30, 2007, at 12:06 PM, wonet2001 wrote:
> there is a function in my code like this:
>
> function calcu(array)
> {
> for (i=1; i<BarCount;i++)
> {
> ...........
> }
> }
>
> in regular code. I call this function after timeframeset to different
> timeframe, and I have trouble, database is in daily
>
> timefrmaeset(inWeekly);
> wvalue = calcu(C);
> timeframerestore();
>
> dvalue = calcu(C);
>
> plot(dvalue .....)
>
> plot(wvalue .....)
>
> dvalue plot correctly, but wvalue is totally wrong.
>
> using debugview, check the Barcount, they are the same value. how to
> correct it?
>
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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/
|