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!
See more
See less

Partner 728x90

Collapse

Indicator trend lines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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=49055
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks, it's wrapped in a DLL so I'm not sure. So I'm guessing the line class way doesn't show up in DrawObjects? Is there an another way to reference these lines? I'm game for trying any suggestions.

      Comment


        #4
        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);
        Otherwise, you may contact the vendor to see how it was programmed.
        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 NinjaTrader_Clayton  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        28 views
        0 likes
        Last Post ScottWalsh  
        Started by frankthearm, Today, 09:08 AM
        10 responses
        36 views
        0 likes
        Last Post frankthearm  
        Started by mmenigma, Today, 02:22 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NRITV, Today, 01:15 PM
        2 responses
        9 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Working...
        X