Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ADX indicator not providing public access to data
Collapse
X
-
ADX indicator not providing public access to data
I am working on a strategy that I would like to incorporate data from the ADX/DMI indicators. I notice that neither the the ADX or DM indicators provide this data in public variables. Before I start down the path of creating yet another ADX indicator, is there any reason why these data elements are not available for this purpose?Tags: None
-
If I understand correctly, I should be able to do something like:
ADX myADX = ADX(14);
DM myDM = DM(14);
if (myADX > myDM.DiPlus) { do something
??
My conclusion came from looking at variables exposed by DM. Seems that also exposing Tr would make this a bit cleaner.
Comment
-
Hi Josh,
Tried
but got this error message :Code:double myADX = ADX(20)[0]; print (myADX);
"Operator '>=;Cannot be applied to operands of type 'NinjaTrader.Indicator.ADX' and 'int'"
There is no single operator >= in my code ...
I am trying to print the current ADX value and also have tried
but it doesn't work too.Code:double myADX = ADX(20); print (myADX);
Originally posted by NinjaTrader_Josh View PostHi,
You should have no problem accessing ADX values.
Code:double value = ADX(20)[0];
Comment
-
You are the man !. I have another problem , seems to be unable to access the ADX value
double myADX = ADX(14)[0];
if myADX >= 25 then
{
statement .....
}
got this error message again:
"Operator '>=;Cannot be applied to operands of type 'NinjaTrader.Indicator.ADX' and 'int'"
Comment
-
if(ADX(14)[0] >= 25)Originally posted by cowcool View PostYou are the man !. I have another problem , seems to be unable to access the ADX value
double myADX = ADX(14)[0];
if myADX >= 25 then
{
statement .....
}
got this error message again:
"Operator '>=;Cannot be applied to operands of type 'NinjaTrader.Indicator.ADX' and 'int'"
{
//do your stuff
}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
83 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment