How to Change time frame in OLE Script

Hallo,

I'm wondering how to change the TimeFrame from default daily to 1 Hours time frame using OLE when i need to export the image file?

i used this script to export image file from my wlist

iWatchList = 0; /* you can define watch list number here */

AB = new ActiveXObject( "Broker.Application" );
Qty = AB.Stocks.Count;

for ( i = 0; i < Qty; i++ )
{
    Stk = AB.Stocks( i );

    if ( iWatchList < 32 )
    {
        if ( Stk.WatchListBits & ( 1 << iWatchList ) )
        {
            AB.ActiveDocument.Name = Stk.Ticker;
            AW = AB.ActiveWindow;
            AW.ZoomToRange( "2010-01-01", "2011-01-01" );
            WScript.Sleep( 2000 ); // 2 seconds delay
        }
    }
    else
    {
        if ( Stk.WatchListBits2 & ( 1 << ( iWatchList - 32 ) ) )
        {
            AB.ActiveDocument.Name = Stk.Ticker;
            AW = AB.ActiveWindow;
            AW.ZoomToRange( "2010-01-01", "2011-01-01" );
            WScript.Sleep( 2000 ); // 2 seconds delay
        }
    }

and i want to export the 1 hours time frame using this script direcly. what should i do?

thank you

Document object has Interval property http://www.amibroker.com/guide/objects.html that you should use. By the way - use Code Tags as per forum rules: How to use this site

Thank you sir..
Im sorry for the Code Tag Rules

@sahamrb Why didn't you search the forum first? You can easily find codes changing chart's interval (using OLE) :

1 Like

Sorry sir..

that's my first posting
thank you for your reminder