• 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 thecashguys, Today, 10:18 AM
    0 responses
    0 views
    0 likes
    Last Post thecashguys  
    Started by pjsmith, Today, 09:58 AM
    0 responses
    6 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by bebbus, Today, 09:13 AM
    0 responses
    5 views
    0 likes
    Last Post bebbus
    by bebbus
     
    Started by roblogic, Today, 08:04 AM
    0 responses
    7 views
    0 likes
    Last Post roblogic  
    Started by williamzz, Yesterday, 04:18 PM
    2 responses
    10 views
    0 likes
    Last Post williamzz  
    Working...
    X