Hist Function |
Post Reply |
Author | |
tamas6
Newbie Joined: 04 Apr 2006 Location: Australia Posts: 5 |
Post Options
Quote Reply
Topic: Hist Function Posted: 29 Dec 2008 at 10:46pm |
Hi,
I'm using the BarsSince function to determine how many bars since my expression was true. I have assigned the result of this to a variable.
Eg
N := BarsSince(expr);
When I attempt to use this variable within the Hist function, I get an error message saying that it has to be an integer number
P := Hist(C, N);
Is there any way around this?
Thanks
|
|
chart rider
Regular Joined: 25 Sep 2004 Location: Australia Posts: 96 |
Post Options Quote Reply Posted: 06 Jan 2009 at 8:46pm |
tamas
Have a look at the VALUEWHEN function in the help menu, it's not something I've used myself, but it looks like it could acheive your desired outcome:
P := valuewhen(1, expr, C);
CR
|
|
tamas6
Newbie Joined: 04 Apr 2006 Location: Australia Posts: 5 |
Post Options Quote Reply Posted: 06 Jan 2009 at 10:08pm |
Hi,
Thanks for the response. A couple of days ago I found this very function and it has enabled me to come to a solution.
|
|
Post Reply |
Forum Jump | Forum Permissions 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 |