Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My strategy needs to access a 2 plots of an indicator

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

    My strategy needs to access a 2 plots of an indicator

    How do I access the current value of the DM() ADX plot?

    I get compile error when I say:

    a = DM(3).+DM[0]

    also this doesn't work

    a = DM(3).Plot0[0] // (order of Plots is +Dm ADX -DM)

    HELP!

    another thread you said to do this to access a plot value,:

    So for your code, you could set a single plot to whatever values you want, and then look for those values in your strategy.
    Code:
    if (myIndicator(...).Plot0[0] == 1)
    // enter long
    ---------------

    Is "Plot0" just actual Plot name in the indicator ie not really "Plot0"

    I am using the DM() indicator.
    It has 3 plots +DM ADX and -DM this is the listed order
    Here is a cappture of indicator properties:



    If I say
    a = DM(3).+DM[0]

    I don't think +DM is a valid name in C#
    So what name do I use

    Error say unexpected identifier

    Does C# have a way to show the properties?
    In VBA there was a properties box
    It says [+1 overload] when my cursor is over the indicator
    How do I know what the overloads are?

    What if I can't see the indicator code, how do I know the names of the plots

    is that the same as getting +DM plot?

    #2
    Hello dcmdp,

    Plot components of DM indicator are accessed with:

    double dmDefault = DM(3)[0];
    double dmDiPlus = DM(3).DiPlus[0];
    double dmDiMinus = DM(3).DiMinus[0];

    The easiest way to identify correct syntax for multi-plot indicators is with the strategy wizard. You can select from the available plots in the gui. This help guide article can walk you through this:
    How to compare plot values of multi-plot indicators

    You don't reference Plot0 unless the indicator has this named as the plot. When you create indicator scripts through the wizard, this is the default first plot and why it was likely used in an example.

    Please see here for help working with intellisense in NinjaScript.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X