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

Referencing Indicator plots

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

    Referencing Indicator plots

    Good day,

    I am a bit puzzled on how to correctly code a reference to indicator plots.

    I have done this successfully for some indicators I created however now I have an instance when the plots are not available / cannot be referenced somehow,

    The below code works fine and the plots "BuyPlot" and "SellPlot" are available when coding (with wrench icon)
    var _refbuy = GomiSignals(1,1,true,true).BuyPlot[0];
    var _refsell = GomiSignals(1,1,true,true).SellPlot[0];

    Now I have another indicator called GomiBiasOcillator which has2 plots with below namens.

    AddPlot(Brushes.Green, "Bulls");
    AddPlot(Brushes.Red, "Bears");

    If I try to reference the plots like below, the plot is not available and I get an error CS1061 that there is no definition for "Bulls".
    var _bulls = GomiBiasOcillator().Bulls[0]

    What could be the difference between the successfull reference and the error I am getting now?

    Hope someone can help me out.


    #2
    Hello Diepy,

    It will need a public series that returns the plot series.

    [XmlIgnore()]
    public Series<double> Bulls
    { get { return Values[0]; } }
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by casabella, Today, 04:12 AM
    0 responses
    5 views
    0 likes
    Last Post casabella  
    Started by Ludwik, Today, 03:52 AM
    0 responses
    6 views
    0 likes
    Last Post Ludwik
    by Ludwik
     
    Started by wuannetraam, Today, 02:40 AM
    0 responses
    10 views
    0 likes
    Last Post wuannetraam  
    Started by cyberpete76, 03-27-2023, 12:29 AM
    7 responses
    271 views
    1 like
    Last Post slightly  
    Started by renewsaltwater, Today, 01:15 AM
    0 responses
    4 views
    0 likes
    Last Post renewsaltwater  
    Working...
    X