Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Why is ADXVMA different?
Collapse
X
-
Why is ADXVMA different?
ADXVMA has been working fine for me except for the fact that when it is applied it is not visible. Then after refreshing the indicators it will show up. My issue is that I'm trying to write an another indicator that will draw a triangle when price crosses the ADXVMA. As easy as this is I can't get it to print a triangle. What's going on in ADXVMA that causes these issues of calling the indicator from another script or appearing in the first place?Tags: None
-
Hi BReal, thanks for posting. This is not a deafault indicator, so the original developer will need to provide support for it. The indicator is failing to initialize, so I moved all the State.Configure code to State.Data loaded, presumably the cbr=ChartBars.ToIndex; was null in State.Configure so I moved it all into State.DataLoaded:
Code:else if (State == State.DataLoaded) { Period=_Period; k = Math.Round(1.0/(double)Period,6); up = new double[2]; down = new double[2]; ups = new double[2]; downs = new double[2]; trend = new int[2]; //index = new double [period+1]; index = new Series<double>(this); Volatility= new double[2]; _ADXVMA=new double[2]; Start=Core.Globals.Now; LoadFlag=true; cbr=ChartBars.ToIndex; }
Chris L.NinjaTrader Customer Service
-
Chris to confirm
the
else if (State == State.Configure)
was just changed to
else if (State == State.DataLoaded)
so now there is no
else if (State == State.Configure)
Thanks
I changed the line in indicator from Configure to DataLoaded
but I am still having errors
error on calling OnStateChange method Object reference not set to an instance of an object
Last edited by DTSSTS; 02-23-2023, 09:34 AM.
Comment
-
Chris L.NinjaTrader Customer Service
Comment
-
Thanks i am installing now, but wanted to be sure i updated the script correctly
I changed the line in indicator from Configure to DataLoaded
wanted to make sure I was not suppose to keep the configure and copy all the code and repeat the lines of code in the DataLoaded section of code
Thanks
Comment
-
Hey DTSSTS!
Here is how I've modified the file. It's been working great for me.Attached Files
Comment
-
I am not real sure what happen with Visual I followed directions up to the attach part and verified Attached to Automatic managed betore I Click ATTACH
After that no opportuniity to select my indicator or strategy to inspect
it just started processing in the Diagnostics Tools window
build error
Comment
-
BReal THANKS
I Have downloaded you cs, I guess i will have to remove from my strategies and from my indicators before i PASTE in your version
I THINK a different similar indicator i likely the issue, but not sure. I installed something from a user and it installed the Lizzard Indicator version amaADXVMA which has alot of other stuff in the indicator and the user had also modified it some as well. So I was going to use ADXVMA to replace the code of the Lizzard version
I see the plot using the ADXVMA on my charts as expected, I coded the ADXVMA into one strategy I have and replace the references to the old amaADXVMA and then blocked the code lines of the amaADXVAM as well, all compiled without issue
when I test strategy in Back Tester I do not get any results and I get the LOG error
Comment
-
BReal I am so confused, My ADXVMA shows in my Script Editor, the cs file does not show in my NinjaTrader8 file folders where I pasted it when I installed it, compiled and It is present in my indicators list. HOW can it be an indicator but not have a cs file
Comment
-
this was the error
error on calling OnStateChange method Object reference not set to an instance of an object
I removed my cs file that came from the indicator download at
https://ninjatraderecosystem.com/use...wnload/adxvma/
I installed BReal cs file posted here to day and I do not have an error anymore
I had updated the DataLoaded update provided by you, but my indicator had some issue, BReal version works as expected
that was my test strategy for the ADXVMA I am about to recode the primary strategy and see if it works there as well
If NOT I will repost here
Thanks to all
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Trader146, Today, 09:17 PM
|
0 responses
5 views
0 likes
|
Last Post
by Trader146
Today, 09:17 PM
|
||
Started by ttrader23, 05-08-2024, 09:04 AM
|
9 responses
43 views
0 likes
|
Last Post
by ttrader23
Today, 08:29 PM
|
||
Started by ZeroKuhl, Yesterday, 04:31 PM
|
8 responses
46 views
0 likes
|
Last Post
by ZeroKuhl
Today, 07:25 PM
|
||
Started by reynoldsn, Today, 07:04 PM
|
0 responses
11 views
0 likes
|
Last Post
by reynoldsn
Today, 07:04 PM
|
||
Started by puapwr, Today, 06:09 PM
|
0 responses
5 views
0 likes
|
Last Post
by puapwr
Today, 06:09 PM
|
Comment