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
Lost in time( again..) :) [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Lost in time( again..) :)
just take a reading on currenttime_s when barstatus = 2.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
Re: Lost in time( again..) :)
Hello TJjust take a reading on currenttime_s when barstatus = 2.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
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
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Lost in time( again..) :)
that won't work...Hello TJjust take a reading on currenttime_s when barstatus = 2.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
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
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.
Re: Lost in time( again..) :) [SOLVED]
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
viewtopic.php?f=16&t=10411&p=57641#p57641
Re: Lost in time( again..) :)
TJ,
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.
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
Re: Lost in time( again..) :)
I do wrote a little function to return a composite of a date + time expressed in Julian date.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
Code: Select all
jul_dt = el_datetodatetime(date) + eltimetodatetime_s(time_s);
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
- (26.74 KiB) Downloaded 533 times
Re: Lost in time( again..) :)
Nice code JohnI 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
Will try out your function tomorrow
Martin
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Lost in time( again..) :)
Look for an indicator name "Tick Speedometer"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
http://www.tradersxchange.com/viewforum.php?f=51