Thanks for the code, that is a great simplification. I'll test it out and if it gives the same results I'll release a new version with your algorithm.
I started it wanting it to work for any bar and it got a bit complicated. I started with a 30 second chart and for some reason I saw a shortcut to just use a tick bar and add them up. Which is better than 30 sec chart because with a tick chart you get the readings more often without affecting the result.
It worked pretty well for CL today but the hard part to using it is knowing how to handle the cases when it doesn't work. It was very early on the big move down and then the final bottom didn't have much of a signal. Will take some practice to figure all this out.
Does multicharts have time precision more than 1 second? I'd like to try this out on tradestation, I'm trying to avoid ninjatrader for charting. Today Ninja got really slow on me, unusable even. I didn't have anything open today that I didn't yesterday except this POT indicator and since that had COBC = true it shouldn't have been slow. I had to close some unused charts & doms and then it was ok.
Won't work on tradestation, which only has 1-minute granularity last I checked. On multicharts you get 1-second granularity... not as precise as ninja but since we are counting 20 or 30 seconds at a time, that shouldn't be a big issue in this case.
The following user says Thank You to Richard for this post:
I released a new version of the POT indicator. It has audio alerts and I also used Richard's algorithm which is much more efficient. It turns out that my algorithm was the source of my ninja slowdowns. I noticed this when using it with market replay. When I dragged the time slider it took about 20 minutes to update the chart.
Dax trading abysmal today. I had two trades that I ended up exiting at BE and +1 and they would have went on to hit at least +10. So I need more confidence there. That was as the dax was in a trading range.
Dax broke out and I didn't learn my lesson from crude the other day and I didn't keep in mind the big picture which was supporting a breakout.