Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why I don't get any plot with my indicartor

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

    Why I don't get any plot with my indicartor

    Hi,

    I am trying to develop my own indcator (my first one), but I don't get any plot. It is so easy, I just want to calculate the value between Close[0] minus Close[10] like this:

    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    Overlay = false;
    }


    protected override void OnBarUpdate()
    {
    Plot0.Set(Close[0]-Close[10]);

    Thank you very much,
    Carlos

    #2
    Hello CarlosTTW,

    Thank you for writing in.

    You'll want to check that you have enough bars before attempting to access Close[10]. You'll run into a run-time error if you try to access a non-existent Close value.

    More information about how to do this can be found on our support forum at this link: http://ninjatrader.com/support/forum...ead.php?t=3170

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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