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

[amibroker] timer to reflect timezone - need help on this code



PureBytes Links

Trading Reference Links

i'm on Hong Kong time zone and HK has a 12 hours difference to EST. 
i'll like to know how to modify this script to reflect the time zone, 
so that my timer can starts at 9.30pm (HK time) and not 12.00am. many 
thanks.

//

tempnum = Now( 4)-TimeNum() ;


TimeRem = Interval() - ((int(tempnum[BarCount - 1] / 100) * 60) + 
(tempnum[BarCount - 1] - int(tempnum[BarCount - 1] / 100) * 100));
if (TimeRem[BarCount - 1] < 0) TimeRem = 0;
TitleTimeRem = EncodeColor(colorBlueGrey) + "Time Remaining: ";
MinuteVar = int(TimeRem / 60);
SecondsVar = int(frac(TimeRem / 60) * 60);

if (TimeRem[BarCount - 1] > 60)
{
TitleTimeRem = TitleTimeRem + EncodeColor(colorWhite) + MinuteVar 
+ ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else if (TimeRem[BarCount - 1] > 20)
{
TitleTimeRem = TitleTimeRem + EncodeColor(colorYellow) + MinuteVar 
+ ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else
{
TitleTimeRem = TitleTimeRem + EncodeColor(colorLime) + MinuteVar 
+ ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}

Title =   TitleTimeRem + EncodeColor(colorDarkGreen) ; 




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/