Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New chart type based on spread

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

    New chart type based on spread

    Hi all,

    I'm a new NT user and I'd like to know is it possible to code a new chart type (it seems to me to understand that NT call them BarTypes) with the following logic:
    the bars of that graph should be a weigthed linear combination made of three (or more) instruments.

    Ideally, I'd like to initialize such chart type with something linke that:

    ...(Instrument2, Instrument3, Weigth1, Weigth2, Weigth3)

    and I'd like to plot bars created as: Weigth1*Instrument1 + Weigth2*Instrument2 + Weigth3*Instrument3


    Thanks.

    #2
    Hello doppietta, and thank you for your question.

    A BarsType is intended to take data that has already been processed and turned into a Series, and to simply display it to the end user. Since you are discussing processing incoming Instrument data, an Indicator is more appropriate for this application.

    Attached is a code sample that accomplishes this goal. Code samples we provide are for educational purposes, and are not intended for live trading, and are not guaranteed to accomplish any user goal or to be maintained. It is likely code changes in the future will break this code.


    Please let us know if there are any other ways we can help.
    Attached Files
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 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
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X