How to get a tick creation time?

Questions about MultiCharts and user contributed studies.
gnoygnas
Posts: 3
Joined: 23 May 2013
Has thanked: 1 time

How to get a tick creation time?

Postby gnoygnas » 28 May 2013

Hello there,

I'm new to MC and I'm wondering how to get the creation time of tick bar.
Please verify below code.
Any helps would be appreciated.
Thanks.

Code: Select all

VARS: STimeToSecond(0), TimeToSecond(0), TicksInterval(0);
VARS: SetStartTime1(0), SetStartTime2(0), SetEndTime1(0), SetEndTime2(0);

// Get the start of bar time
SetStartTime1 = (TimeToMinutes(Time_s[1]) * 60);
SetStartTime2 = (FracPortion(Time_s[1] / 100) * 100);
STimeToSecond = (SetStartTime1 + SetStartTime2);

// Get the end of bar time
SetEndTime1 = (TimeToMinutes(Time_s) * 60);
SetEndTime2 = (FracPortion(Time_s / 100) * 100);
TimeToSecond = (SetEndTime1 + SetEndTime2);

TicksInterval = (TimeToSecond - STimeToSecond);

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to get a tick creation time?

Postby TJ » 28 May 2013

Look up

Barstatus = 0

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to get a tick creation time?

Postby TJ » 28 May 2013

the starting time of a tick bar is practically the end time of the previous tick bar.

gnoygnas
Posts: 3
Joined: 23 May 2013
Has thanked: 1 time

Question about the creation time of a tick bar

Postby gnoygnas » 29 May 2013

Please see the attached image that contains PL code and problems.
Any helps would be appreciated.

Thanks.

[img]Creation%20Time%20of%20Tick%20Bar#01.png[/img]
[img]Creation%20Time%20of%20Tick%20Bar#02.png[/img]
[img]Creation%20Time%20of%20Tick%20Bar#03.png[/img]
Attachments
Creation Time of Tick Bar#03.png
(8.04 KiB) Downloaded 631 times
Creation Time of Tick Bar#02.png
(50.24 KiB) Downloaded 587 times
Creation Time of Tick Bar#01.png
(47.27 KiB) Downloaded 611 times
Last edited by gnoygnas on 29 May 2013, edited 1 time in total.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to get a tick creation time?

Postby TJ » 29 May 2013

Please see post #12
viewtopic.php?f=16&t=6929


Return to “MultiCharts”