So I'm trying to reference a trend line object in a strategy, that trend line is drawn from another indicator. I'm currently aware of the foreach(IDrawObject draw in DrawObjects) trick, but its not seeing any of the lines drawn by the indicator. It can see manually drawn ones, and I'm positive the lines being drawn are objects not plots. Any ideas?
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
Indicator trend lines
Collapse
X
-
Indicator trend lines
Hi,
So I'm trying to reference a trend line object in a strategy, that trend line is drawn from another indicator. I'm currently aware of the foreach(IDrawObject draw in DrawObjects) trick, but its not seeing any of the lines drawn by the indicator. It can see manually drawn ones, and I'm positive the lines being drawn are objects not plots. Any ideas? -
Hello joe jack,
That depends on how the indicator is drawing the line. It can be either the Line Class: http://www.ninjatrader.com/support/h...line_class.htm
Otherwise, it can be drawn manually: http://www.ninjatrader.com/support/h...l?drawline.htm
For the Line Class drawn objects you may view the following forum post for a reference.
http://www.ninjatrader.com/support/f...ad.php?t=49055JCNinjaTrader Customer Service
-
Hello joe jack,
You may use the following example to try to get the value of a Line from another indicator:
Code:// ADXR "Lower" Line Print("Test output Line value: "+ ADXR(10, 14).Lines[0].Value);
JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GwFutures1988, Today, 02:48 PM
|
1 response
4 views
0 likes
|
Last Post Today, 03:09 PM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
6 responses
28 views
0 likes
|
Last Post
by ScottWalsh
Today, 02:57 PM
|
||
Started by frankthearm, Today, 09:08 AM
|
10 responses
36 views
0 likes
|
Last Post
by frankthearm
Today, 02:54 PM
|
||
Started by mmenigma, Today, 02:22 PM
|
1 response
3 views
0 likes
|
Last Post Today, 02:34 PM | ||
Started by NRITV, Today, 01:15 PM
|
2 responses
9 views
0 likes
|
Last Post
by NRITV
Today, 01:51 PM
|
Comment