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

[amibroker] Re: TimeFrameSet.. Is this a bug?



PureBytes Links

Trading Reference Links

Steve!
You are absolutely right! 
I guess thats tunnel vision, it is so obvious!
Thanks a lot!
enzo


--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
>
> Hi - Just off the top of my head...
> 
> You are using multiple IF statements and it looks like all are 
being 
> executed, i.e....
> 
> 1) If timeframe is 15 mins, you set it to hourly...
> 2) next IF checks for hourly (which you just set it to ), then 
sets it to 
> daily...and on until last statement sets it to monthly...
> 
> Try using one IF statement with multiple ELSE IF's.
> 
> Steve
> 
> ----- Original Message ----- 
> From: "enzo" <herrfrechdax@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, December 14, 2005 12:57 PM
> Subject: [amibroker] TimeFrameSet.. Is this a bug?
> 
> 
> > Hello Usergroup!
> >
> > Can someone please test this code? I want to change timeframe 
within
> > my AFL-code, but the result is always "Monthly".
> > Per example when in 15min timeframe it should change to hourly.
> >
> > I am running 4.70 Professional Edition.
> >
> > //**************
> > before=Interval(2); // before changing timeframe
> >
> > if (Interval(2)=="1-minute") TimeFrameSet( in5Minute );
> > if (Interval(2)=="5-minute") TimeFrameSet( in15Minute );
> > if (Interval(2)=="15-minute") TimeFrameSet( inHourly);
> > if (Interval(2)=="Hourly") TimeFrameSet( inDaily);
> > if (Interval(2)=="Daily") TimeFrameSet( inWeekly);
> > if (Interval(2)=="Weekly") TimeFrameSet( inMonthly);
> >
> > afterChange=Interval(2);
> >
> > TimeFrameRestore(); // restore time frame to original
> >
> > afterRestore=Interval(2);
> >
> > Title="before : "+before+" after change : "+afterChange+" after
> > restore : "+afterRestore;
> > //********************
> >
> > Thank you in advance
> > enzo
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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