• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 7robert, Today, 10:07 AM
    0 responses
    1 view
    0 likes
    Last Post 7robert
    by 7robert
     
    Started by emuns, Today, 09:36 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by lmatiukas, Today, 09:31 AM
    0 responses
    4 views
    0 likes
    Last Post lmatiukas  
    Started by Irukandji, Today, 09:09 AM
    3 responses
    9 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by frankduc, Today, 08:12 AM
    2 responses
    12 views
    0 likes
    Last Post frankduc  
    Working...
    X