|
Parsippany, NJ
Posts: 2 since May 2015
Thanks Given: 1
Thanks Received: 0
|
In ThinkOrSwim's ThinkScript, I'm trying to create an indicator which displays an average of the past 5 bars which had a range of more than 10 ticks.
For example, lets say last 10 bars had the following ranges (in ticks): 20, 22, 25, 17, 10, 7, 8, 8, 9, 8.
I want my indicator to display a value of 18.8 (i.e, (20+22+25+17+10)/5 = 18.8).
I'm fairly new to ThinkScript and so far I've been able to program an indicator which displays the average of the last 5 bars but I want to make one which will only average those bars which fulfill a certain criteria.
Any help would be appreciated!
|