All I want to do is plot on a 15 min chart certain bars at specified times, preferably having those times in the indicator menu so that I can change them around after the indicator is loaded. But I can't even get to step 1 which is being able to code in plotting a barcolor on a specific bar.
So if someone could show me how to write out in Ninja script:
if (Time[0] == 094500) {BarColor = Color.Red;} (which of course doesn't work)
I would be very grateful.
I also tried making a different version of the default Range indicator with the idea being to color the bars at certain times but again was unable to figure out how to code it for the same reason as in the snippet above which doesn't work. It doesn't like ints or strings.
That's Step One.
What I would really like to have is an indicator that would show the average Range, bar by bar, over the period which the chart is loaded so that with a 30 minute chart, for example, the indicator would plot on each bar the average range at that time. Perhaps it is not possible to have it automatically adjust to the entire loaded chart, in which case the last x occurrences, like 30 or whatever. That way the indicator will instantly show the times of day with the highest and lowest ranges and/or whether or not there are any discernible periods or if there is an even distribution throughout all times of day.
This is sort of like a daily seasonal indicator and I suspect it will need savvy loop coding which I am useless at even when not working in Ninja which I am totally useless at. But such an indicator would be a handy analytical tool for quickly picking out instruments that exhibit clear patterns of having certain times of day that are regularly more volatile than others.
Comment