• 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 ivan2007007, Today, 12:55 PM
    1 response
    5 views
    0 likes
    Last Post ivan2007007  
    Started by lazerpd, Today, 12:45 PM
    0 responses
    8 views
    0 likes
    Last Post lazerpd
    by lazerpd
     
    Started by UncleRyan, Today, 12:45 PM
    0 responses
    3 views
    0 likes
    Last Post UncleRyan  
    Started by kattiehowe, Today, 09:01 AM
    1 response
    21 views
    0 likes
    Last Post MojoJojo  
    Started by kylef, Today, 11:36 AM
    1 response
    23 views
    0 likes
    Last Post kylef
    by kylef
     
    Working...
    X