Hello,
I am looking for an indicator to show me as histogram the elapsed time in seconds for a volume or range bar to complete...does anyone have this ?
thanks in advance
time passed to complete a bar (range-ticks-volume) indi [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: time passed to complete a bar (range-ticks-volume) indi
Hello,
I am looking for an indicator to show me as histogram the elapsed time in seconds for a volume or range bar to complete...does anyone have this ?
thanks in advance
Code: Select all
plot1( Time_s - Time_s[1] );
Re: time passed to complete a bar (range-ticks-volume) indi
Thanks TJ,
The indicator seems to add previous bars time on every hourly change...please take a look
at the picture...
The indicator seems to add previous bars time on every hourly change...please take a look
at the picture...
- Attachments
-
- time per bar.png
- (39.01 KiB) Downloaded 592 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: time passed to complete a bar (range-ticks-volume) indi
Give this a try:
Code: Select all
Plot10(( datetime - datetime[1] ) *86400 );
Re: time passed to complete a bar (range-ticks-volume) indi
now there is a big reading for the first bar of each day...
but not for all days...strange..
but not for all days...strange..
- Attachments
-
- time per bar 2.png
- (89.44 KiB) Downloaded 578 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: time passed to complete a bar (range-ticks-volume) indi
If you are not running a 24 hr chart, this will happen.now there is a big reading for the first bar of each day...
but not for all days...strange..
You have to add a condition to take the 1st calculation from the session opening instead of the previous bar.
Re: time passed to complete a bar (range-ticks-volume) indi
Hi TJ,
please take a look at this code...what you think..
please take a look at this code...what you think..
Code: Select all
var: timelapsed(0);
if date <> date[1] then
timelapsed = time_s - (sessionstarttime(1,1)* 100)
else
timelapsed = (datetime - datetime[1]) * 86400;
Plot10(timelapsed);
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: time passed to complete a bar (range-ticks-volume) indi
Looks good !Hi TJ,
please take a look at this code...what you think..
Code: Select all
var: timelapsed(0);
if date <> date[1] then
timelapsed = time_s - (sessionstarttime(1,1)* 100)
else
timelapsed = (datetime - datetime[1]) * 86400;
Plot10(timelapsed);