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

Re: [amibroker] TimeFrameCompress, how it works ?



PureBytes Links

Trading Reference Links

Hi,

I think you might need to use the 'expandFirst' parameter instead of
the default 'expandLast'.

expLowWeekly = TimeFrameExpand( LowWeekly, inWeekly, expandFirst  );
expHighWeekly  = TimeFrameExpand( HighWeekly, inWeekly, expandFirst );


Extract from the Help file.

Available modes:
expandLast - the compressed value is expanded starting from last bar
within given period (so for example weekly close/high/low is available
on Friday's bar)

expandFirst - the compressed value is expanded starting from first
bar within given period (so for example weekly open is available from
Monday's bar)
 
expandPoint - the resulting array gets not empty values only for the
last bar within given period (all remaining bars are Null (empty)). 



Regards,
William Peters (AmiBroker Group Moderator)
www.amitools.com




Tuesday, December 21, 2004, 10:32:39 AM, you wrote:

t> Hi,

t> I works with AmiBroker 2.65 Beta.

t> I write this AFL code on EOD data :


t> Code:

t> LowWeekly = TimeFrameCompress( Low, inWeekly );
t> HighWeekly = TimeFrameCompress( High, inWeekly );

t> _SECTION_BEGIN("Close");
t> Plot( Close, _DEFAULT_NAME() , ParamColor("Color", colorBlack ),
t> styleCandle);
t> _SECTION_END();

t> expLowWeekly = TimeFrameExpand( LowWeekly, inWeekly );
t> expHighWeekly  = TimeFrameExpand( HighWeekly, inWeekly );

t> _SECTION_BEGIN("expLowWeekly");
t> Plot( expLowWeekly , _DEFAULT_NAME() , ParamColor("Color", colorRed ),
t> ParamStyle("Style", styleThick));
t> _SECTION_END();

t> _SECTION_BEGIN("expHighWeekly");
t> Plot( expHighWeekly  , _DEFAULT_NAME() , ParamColor("Color", colorBlue ),
t> ParamStyle("Style", styleThick));
t> _SECTION_END();

t> "expLowWeekly :" + WriteVal(expLowWeekly );
t> "expHighWeekly :" + WriteVal(expHighWeekly);



t> With this code, when I choose the "Day view", I think the blue line will be
t> a the highest from monday to friday, and the red one will be at the lowest
t> from monday to friday.

t> What I see is :
t> The blue line is the high of friday and the red the low of friday.
t> Where is my mistake ?

t> Tintin92



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/