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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    173 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    90 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    129 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    208 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    186 views
    0 likes
    Last Post CarlTrading  
    Working...
    X