I was trying to use the ADXVMA & SMI2 indicators (attached below). However, seems like they repaint. I would really appreciate if anyone could fix this problem so that they don't repaint.
Thanks
-Keep
Can you help answer these questions from other members on futures io?
hi Keep - as always --- send us pictures of what you mean !
BTW - the repainting sometimes is in the nature of some Ninjaindicators -
in example if ADXVMA is rising the color is black
if its flat - the color is yello.
but to realize that it is flat you must wait for the next bar to close -
and if this next Bar has the same value then the last one - the color of the last one gets a changed to yello because now its a flat on compared to the current one.
thats the method you have to understand.
that behavior you find in many multicolor-indis in Ninja
i know this shure for ADXVMA
i know this also shure for many double-moving-AVs ( DMAs)
i dont know if SMI2 is a multicolor-indi.
if yes - the repainting is "normnal" and can not be fixed.
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,785 since Jun 2009
Thanks: 32,314 given,
97,581
received
It actually can be corrected but requires the code be written to allow for a 'fix' to be possible. And by fix I really mean work-around. There is no actual fix. NT limitation.
On all new code I am writing these days, I detect if the Plot is a line. If it's a line, then it has to repaint in order to connect the two lines. NT limitation. But if the plot is not a line, then I purposely do not connect the two plots.
Personally on indicators that have multi-colored plots, I try to avoid using Line plots for this very reason. But even if you use a Dot plot, the code must be smart enough to detect that and not repaint. Simply using a dot plot on 99% of the code out there today will still result in repainting of the last dot back.
Appreciate your response Mike. So it is not a quick fix I assume. I wanted to use it as a strategy but I believe if it is going to reprint, then it probably can not be used...Am I assuming correctly?
well - for strategys , you have to use versions of the indicators without multicolor-function ! They have only 1 plot and thats easy + clear to handle.
that works perfect then.
they are also available.
Would you please direct me to where I could find them...The ADXVMA & the SMI2. Also how would the non multicolor version work if there are no colors to change? How would one know when line changes from red to yellow or blue, if there is no color. Sorry for the question but when it comes to strategies and programming I have NO clue.
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,785 since Jun 2009
Thanks: 32,314 given,
97,581
received
For strategies, I usually build in something on my indicators specifically for strategy use. I usually use the Signal dataseries, but depends for each strat.
Most multi-color plot indicators are not strategy friendly. But you can make them strategy friendly.
The work is not hard (both making it strategy friendly and making it not redraw). However, I can't do it right now sorry, I have a lot of (paid) work that I have to finish first.
Requested by VIP user. This ADXVMA adds the ability to not re-paint 1 bar back if the plot style is not a line. So if you use Lines, they will repaint to connect the plots (like normal). But if you use something else, like Dots, they will not repaint.
…
Thank you Mike..Just downloaded it. It works great. So in order to use it in the strategy, I have to adjust the parameters to dot instead of line for plotting. The SMI2 that I have been using was the one from the download section. Does that need to re-programmed or can I just use the same but change the lines to dots? Sorry if it sounds stupid!
Requested by VIP user.
Same SMI2 but this one won't repaint if you use a plot other than Line. If you use line, it will repaint 1 bar back to connect plots (like normal). But if you use something else, like a dot, it won't repaint.
Mike
COMPATIBILITY:
NinjaTrader …
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,785 since Jun 2009
Thanks: 32,314 given,
97,581
received
No -- in a strategy, for ADXVMA, use the Signal dataseries. If signal=1 it's rising, if -1 it's falling. If you want some other info out of it it's not available in present code form.
Using dots (instead of lines) will prevent it from repainting 1 bar back in time. It doesn't effect the Signal dataseries.
For SMI2 -- it has to be re-coded. I just made the change for you (above post). Changing the plot style to dots will not work unless the code is specifically designed to work that way, and afaik, 99% of code out there isn't designed this way. I'm building it in to all my custom work going forward.
Not agree - they are !
SMI2 == StochMomIndex // SMI2 then was the evolution to the colored-version ADXVMA-Alert == native good old simple ADXVMA // ADXVMA-alert then was the evolution to the diamond-alert-versions after the evolution to the multicoloredversion - lol
these colorful tweaked indies are so present+around here that most of the guys even dont know where they came from i think
In Ninjatrader 7, multi color plotting is accomplished by changing the color of one plot, rather than by switching between different plots and connecting them with line segments that repaint.
This is a big improvement over Ninjatrader 6.5!
In the Ninjatrader forums, the "MultiColor Plot Approach" thread deals with this subject. To find it, just do a keyword search for the quoted phrase, as I was unable to post the link.
Post #1 in that thread links to sample code showing how to use this new type of multi-color plotting.
Post #23 in that thread links to sample code showing how to create parameterized, user definable colors to use in multi color plots.