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
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
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
-
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 Brevo, Today, 01:45 AM
|
0 responses
3 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
239 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
384 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
6 views
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
Comment