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)
My way is just importing the ADXVMA via the JMAPaint.zip (to retain it for the future I saved that locally on a separate place). Apparently if I import it via that ZIP the ADXVMA does not recompile like when copying in only the .cs file and compile.
Don't ask me why ... but it works (for me). ADXVMA @2 is also a way.
My guess is that everybody who runs a new NT version and edit/compiles the ADXVMA will ruin his ADXVMA for use in DMAPaint @setting 1.
I think the working ADXVMA might just be a version from somebody who did not yet update to a newer NT version.
Anyway, I am glad I finally found a difference. As you can read in the DMAPaint thread it was bugging me seriously and driving me mad I couldn't find the cause. It didn't make sense.
I think that if this code change can be confirmed by more users is to ask NT if they changed anything in their compiler over the last NT version. But don't hold your breath. As ADXVMA is not a standard NT indicator they will probably not investigate.
Apparently I was not clear ... I added step by step to make it easier: DO use .......Utilities..... Import NinjaScript.... find the JMAPaintBar.zip ... Open ... say 'Yes" to ADXVMA to replace existing file...(the others is your choice) ...then NT will start importing and you see the hour glass .... then NT says it successfully imported all indicators ..bla bla ... click OK
Addition: I now made a correct ADXVMAv3.ZIP which contains only a good ADXVMA (with RJay mod)
... see couple posts below
That is all ... you are ready ... Do NOT copy the ADXVMA.cs file in and compile. I don't know why it works via importing the ZIP but with me it does.
What I meant with saving the JMAPaint.zip somewhere locally, was to keep the JMAPaint.zip that is currently in the download section at a save place. In an update it might inadvertently be updated with an ADXVMA that you like less.
Peter, great job here. I am wondering if this phenomenon is self-contained to just your workstation, or others. Have you tried deleting your Ninja cache?
I suppose that there is really no point in further talking about ADXVMA. The answer seems clear. Since you know better than anyone, why don't you just go remove any instances of the "bad" ADXVMA from the forum, delete the attachments from the posts, etc, because clearly this has been a headache for you (and all of us). I would do this but I am afraid I would make things worse.
As for the files in the download section with the wrong version, if it is my stuff then you have permission to change out the file or if you'll tell me which ones are the offending ones I will do it.
Thanks Peter for your guide.
Maybe once it is fixed, we should post a new thread with all the correct indicators in it. Maybe also name the indicators with a unique name and this will not cause it to over write the previous ones. Just a thought
Right, I finally succeeded tricking NT to export a good ADXVMA (edited outside NT in Notepad).
The trick:
If you need to edit this ADXVMA.... make a copy to your desktop ... edit that one in Notepad ... save in Notepad ....overwrite the original in the NT indicator directory .... immediately export to a ZIP .... and then import the ZIP and accept overwriting. BTW Any editing of this ADXVMA and compile will on my system generate the code switch as shown before and cause flatlining.
The following ZIP contains only the ADXVMA
- I named it ADXVMA3.0 (shows up as such when adding indicators)
- I included the suggestion of RJay (see in this thread earlier)
Vast, it is a good idea to go for a special name, but then we also need to add that name to the DMAInternal.cs file of the DMA and DMAPaint ... otherwise you cannot use it via the pulldown list with MAs.
I might do that if this v3 proves to work with other people too.
I would like first to have some conformation that:
- they too see the code switch depicted earlier after opening/compiling
- and that this ADXVMAv3 will work for others to solve the flatline
So pls. .... some feedback
If it indeed works I'll remove/adapt the older files and file compilations.
Your post really helped - thank you! While renaming the branch of indicators for Sharky I experienced the exact same thing as you. For some reason NT was compiling a renamed ADXVMA differently than the original (per your diff post). I edited the .cs file in notepad per your instructions and it worked. Not much to add other than your "fix" works and that I don't think this is machine dependent; eg. it's an internal issue w/ NT.
I am trying not create a new thread, as there are already lot of ADXVMA threads in that forum. Recycling this thread now.
I have had a look at the various ADXVMA indicators for NinjaTrader. All of them are coded in a very dirty and inconsistent way. Other than the false initialization already detected by @RJay, there are a number of other problems, which need to be fixed.
Also the try{} catch{} brackets show that the authors are not sure of what they are doing. The period for the indicator is stored 4 times in different redundant variables. Also the code contains a completely useless variable "i", which is set to 0 all the time. This variable points to the MetaTrader origin of the indicator, as it is required for MetaTrade code, if you want to shift the indicator. Ninjatrader does not require that approach and does not make sense to carry that "i" through OnBarUpdate().
Let us say that the code works, but it is clear that probably nobody ever had understood what it is actually doing.
Old ADXVMA code:
Recoded (basic version):
I have then added a feature to color the moving average and added paint bars. The direction of the ADXVMA (up, down, neutral) is exposed and can be accessed by other indicators as a trendfilter. The indicator can also applied to any other input series.
Exported using NT Version 7.0.1000.10
Why code another version of the ADXVMA?
All previous versions of the ADXVMA are based on a dirty transcript from MetaTrader which has a number of bugs, inconsistencies or variables that are not being used. This …