format time

Questions about MultiCharts and user contributed studies.
User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

format time

Postby arnie » 26 Oct 2017

Is there a way to see the correct time format in the hint window?
When moving my mouse over the bars, I have, looking at the screenshot example, 10.109.00.
I would rather see 01:01:09.

I would need something like this:

Code: Select all

Plot1(FormatTime("hh:mm:ss", bartime));
Any ideas?

Thanks!
format_time.jpg
(61.55 KiB) Downloaded 587 times

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: format time

Postby Anna MultiCharts » 27 Oct 2017

Hello, arnie!

PowerLanguage doesn’t have such pre-built function as bartime. Please, check the code of this function and the way it should be calculated.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: format time

Postby arnie » 27 Oct 2017

Hello, arnie!

PowerLanguage doesn’t have such pre-built function as bartime. Please, check the code of this function and the way it should be calculated.
You missed the point.
bartime is just a variable on my code. I'm interested in changing the format in which time is being displayed in the hint window.

Instead of 10.109.00, I would like to see 01:01:09.
Is it possible to do that?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: format time

Postby JoshM » 28 Oct 2017

Instead of 10.109.00, I would like to see 01:01:09.
Is it possible to do that?
As far as I know, that's not possible, unfortunately. If you plot a string on the chart with `PlotN()`, it shows as "N/A" in the chart's Data Window and chart hint.

I don't know of a workaround for this.

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: format time

Postby Anna MultiCharts » 03 Nov 2017

arnie,

as we don't see the way your function/variable is calculated we cannot recommend anything.
Please, provide the full code so that our engineers could analyze it.


Return to “MultiCharts”