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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    184 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    337 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    262 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X