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 RookieTrader, Today, 09:37 AM
|
3 responses
15 views
0 likes
|
Last Post Today, 10:32 AM | ||
Started by kulwinder73, Today, 10:31 AM
|
0 responses
5 views
0 likes
|
Last Post
by kulwinder73
Today, 10:31 AM
|
||
Started by terofs, Yesterday, 04:18 PM
|
1 response
23 views
0 likes
|
Last Post
by terofs
Today, 10:14 AM
|
||
Started by CommonWhale, Today, 09:55 AM
|
1 response
4 views
0 likes
|
Last Post Today, 10:11 AM | ||
Started by Gerik, Today, 09:40 AM
|
2 responses
7 views
0 likes
|
Last Post
by Gerik
Today, 10:04 AM
|
Comment