Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I know many of you are wondering how to know for sure if an indicator repaints the past or not. So I propose we update this thread with indicators that we know for a fact do not repaint, and under what conditions that is true.
What is repainting?
Repainting is when a historical bar (a bar in the past) gets changed after the fact. This usually occurs on multicolor plots, but there are a few exceptions.
Why repaint?
The most popular reason is to connect two different colored plots together. It's a NinjaTrader limitation -- if the second plot were not connected to the first (ie: falling and rising colored plots), then there would be a visible gap between the two lines.
How can I avoid it?
The only way to absolutely, positively, avoid repainting is to examine the source code of the indicator. Only then can you know for certain if it repaints. The giveaway will look something like this:
The first command "Plot0.Set(1, ma[1]);" is the redraw command. It's taking 1 bar in the past and resetting the value of the plot. This in itself is not the real problem. The real problem is that Up, presumably, is an Rising Color plot. So what if 1 bar ago the MA wasn't rising? What if it was actually falling? Not anymore! It just got repainted to show that it was rising. See the problem?
How can I code to not repaint, but still have multicolor plots?
It's simple really, but it is only going to work on non-Line plots. A line has to be connected, but other plots like Dots don't. So the solution is simply to test to see if the user has selected a Line plot style, and if so, repaint. If not, don't repaint.
First it's better to not repaint every single bar, ie "if (Rising(ma))". That's every single rising bar. So we just look to see if this ma is higher than last bar, and if the prior bar was lower. In other words, a reversal in direction. If so, we then look to see if it's a Line plotstyle. If it is, then we have to repaint 1 bar in the past to connect the two plots. But if it is a Dot plotstyle, no repainting occurs, and you can sleep better at night.
If you are going to add an indicator to either list, please include a LINK to the indicator and when possible a version number. Otherwise it is useless because a newer/different version may exist.
mike im looking at a 12 range no gap chart with adxvma alerts set on 2 period, and i changed everything to dots. at 19:03 central time there was a yellow dot on a down bar at 19:26 central time the next bar closed down and both dots changed to red . i read somewhere you said to use dots and not lines and they wont repaint. am i doing something wrong?