Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 maybeimnotrader, Today, 05:46 PM
    0 responses
    6 views
    0 likes
    Last Post maybeimnotrader  
    Started by quantismo, Today, 05:13 PM
    0 responses
    6 views
    0 likes
    Last Post quantismo  
    Started by AttiM, 02-14-2024, 05:20 PM
    8 responses
    166 views
    0 likes
    Last Post jeronymite  
    Started by cre8able, Today, 04:22 PM
    0 responses
    8 views
    0 likes
    Last Post cre8able  
    Started by RichStudent, Today, 04:21 PM
    0 responses
    5 views
    0 likes
    Last Post RichStudent  
    Working...
    X