Lost in time( again..) :)  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Lost in time( again..) :)

Postby arjfca » 08 Jan 2013

Hello

Anyone as the link for the Easylanguage document that is explaining how to do calculation on time. I had read this document few years ago, now , again, I'm lost in time. Did look in the wiki, but still unresolved.

Using tick charts, I want to calculate the time spent to create a bar. To do so, I need to subtract the last terminating bar (Date & Time) with the previous one.

Martin

User avatar
TJ
Posts: 6550
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 965 times
Been thanked: 1892 times

Re: Lost in time( again..) :)

Postby TJ » 08 Jan 2013

arjfca wrote:Hello

Anyone as the link for the Easylanguage document that is explaining how to do calculation on time. I had read this document few years ago, now , again, I'm lost in time. Did look in the wiki, but still unresolved.

Using tick charts, I want to calculate the time spent to create a bar. To do so, I need to subtract the last terminating bar (Date & Time) with the previous one.

Martin


just take a reading on currenttime_s when barstatus = 2.

arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Re: Lost in time( again..) :)

Postby arjfca » 08 Jan 2013

TJ wrote:
arjfca wrote:Hello

Anyone as the link for the Easylanguage document that is explaining how to do calculation on time. I had read this document few years ago, now , again, I'm lost in time. Did look in the wiki, but still unresolved.

Using tick charts, I want to calculate the time spent to create a bar. To do so, I need to subtract the last terminating bar (Date & Time) with the previous one.

Martin


just take a reading on currenttime_s when barstatus = 2.


Hello TJ

Tick bar chart, do have a time value. This ending time will progress as the time pass up to the # tick is reach.

So to to calculate the time spent to create a bar, I would do:
If barstatus = 2 then begin
(Date + time_s) -(Date + time_s[1]);
end;
I need to take account of the date because a bar could be between two calendar day

Martin

User avatar
TJ
Posts: 6550
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 965 times
Been thanked: 1892 times

Re: Lost in time( again..) :)

Postby TJ » 08 Jan 2013

arjfca wrote:
TJ wrote:
arjfca wrote:Hello

Anyone as the link for the Easylanguage document that is explaining how to do calculation on time. I had read this document few years ago, now , again, I'm lost in time. Did look in the wiki, but still unresolved.

Using tick charts, I want to calculate the time spent to create a bar. To do so, I need to subtract the last terminating bar (Date & Time) with the previous one.

Martin


just take a reading on currenttime_s when barstatus = 2.


Hello TJ

Tick bar chart, do have a time value. This ending time will progress as the time pass up to the # tick is reach.

So to to calculate the time spent to create a bar, I would do:
If barstatus = 2 then begin
(Date + time_s) -(Date + time_s[1]);
end;
I need to take account of the date because a bar could be between two calendar day

Martin

that won't work...
if you insist on finding the time of the 1st bar of the day...

Here's a bit background information:
MultiCharts will start a new bar on the new day, regardless of whether the previous bar has completed its tick count.

ie. if you are using a 24 hr 100 tick chart, and the last bar of the day has only 80 ticks when midnight struck. MultiCharts will close out the bar even though the bar has less than 100 ticks.

So what is the time it takes to complete the 1st bar of the day?
The simple answer is the TIME_S.

bowlesj3
Posts: 2016
Joined: 21 Jul 2007
Has thanked: 171 times
Been thanked: 402 times

Re: Lost in time( again..) :)  [SOLVED]

Postby bowlesj3 » 08 Jan 2013

I have often wanted to simplify this difference calculation with a function. I could not resist spending about 2 hours on it. It is in the FAQ "Anything Tricky with dates and times" thread at post #4 (here is the link).

viewtopic.php?f=16&t=10411&p=57641#p57641
These users thanked the author bowlesj3 for the post (total 3):
TJarjfcakiasom

arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Re: Lost in time( again..) :)

Postby arjfca » 08 Jan 2013

TJ wrote:
ie. if you are using a 24 hr 100 tick chart, and the last bar of the day has only 80 ticks when midnight struck. MultiCharts will close out the bar even though the bar has less than 100 ticks.

So what is the time it takes to complete the 1st bar of the day?
The simple answer is the TIME_S.


TJ,
True for the end of session: My session terminate at 5 pm east. And, all ending session bar do have 5 pm as the ending time.

In my case, a bar could be situated between 2 date, i just verified on my chart, if your session is not terminating at midnight.

Martin

arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Re: Lost in time( again..) :)

Postby arjfca » 08 Jan 2013

bowlesj3 wrote:I have often wanted to simplify this difference calculation with a function. I could not resist spending about 2 hours on it. It is in the FAQ "Anything Tricky with dates and times" thread at post #4 (here is the link).

viewtopic.php?f=16&t=10411&p=57641#p57641


I do wrote a little function to return a composite of a date + time expressed in Julian date.

Code: Select all

jul_dt = el_datetodatetime(date) + eltimetodatetime_s(time_s);


I use the function to create an indicator that display the time spent to create a tick bar. The less time it took to create a bar mean the big players are in the trade and accumulate or distribute furiously a position

Bartime = Time_end - Time_End[1]
- This value is then computed in the inverse value 1/ bartime
- Then a Moving average is use as a filter. If lower than the moving average, the value = 0
- Then if the value is lower than the preceding one the value = 0


The result display peaks bar over a region where the big players position themselves
This is a first draft of an idea so some modification may be necessary to get a useful tool.

Martin
Attachments
FastFurious.png
FastFurious.png (26.74 KiB) Viewed 263 times

arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Re: Lost in time( again..) :)

Postby arjfca » 08 Jan 2013

bowlesj3 wrote:I have often wanted to simplify this difference calculation with a function. I could not resist spending about 2 hours on it. It is in the FAQ "Anything Tricky with dates and times" thread at post #4 (here is the link).

viewtopic.php?f=16&t=10411&p=57641#p57641

Nice code John

Will try out your function tomorrow

Martin

User avatar
TJ
Posts: 6550
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 965 times
Been thanked: 1892 times

Re: Lost in time( again..) :)

Postby TJ » 10 Jan 2013

arjfca wrote:Hello

Anyone as the link for the Easylanguage document that is explaining how to do calculation on time. I had read this document few years ago, now , again, I'm lost in time. Did look in the wiki, but still unresolved.

Using tick charts, I want to calculate the time spent to create a bar. To do so, I need to subtract the last terminating bar (Date & Time) with the previous one.

Martin

Look for an indicator name "Tick Speedometer"
http://www.tradersxchange.com/viewforum.php?f=51
These users thanked the author TJ for the post:
arjfca


Return to “MultiCharts”