How to Format Time LONG and obtain numbers of open orders?

Moderator: admin

How to Format Time LONG and obtain numbers of open orders?

Postby JakMike » Sat Feb 13, 2016 10:26 am

Hello,
I use in my indicator the following code to show the actual Time:
Code: Select all
win32.formatDate(win32.currentTimeLocal(), win32.NONE, win32.LONG)

I would like, that the time is showing like hh:mm:ss, but it shows me only hh:mm. There is no different in appearance if I use Win32.LONG or SHORT.
Can somebody tell me, how to display the actual time in the format: hh:mm:ss on the chart?

And another question is, how I can get the numbers of total open orders for that instrument?

Thanks for help
JakMike
 
Posts: 4
Joined: Thu Jan 28, 2016 10:17 am

Re: How to Format Time LONG and obtain numbers of open order

Postby Apprentice » Thu Feb 25, 2016 11:41 am

local theDate = core.dateToTable(source:date(period));
string.format("%d/%02d/%02d %02d:%02d:%02d ", theDate.year, theDate.month, theDate.day, theDate.hour, theDate.min, theDate.sec)
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 5 guests