Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
how to do a bar count from the most recent data and reset to 0 on a specific count? Reset to 0 on 25 bars from the most recent bar
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
This will do it from the start: Try a variation with BarsSince(), for whatever you're doing.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Code:
count:=Cum(1);
reverseBarIndex:=lastvalue(count)-count;
{plot}
mod(reverseBarIndex,25);
wabbit [:D]
|
1 user thanked wabbit for this useful post.
|
|
|
Users browsing this topic |
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.