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

Creating a user instrument from other two instruments NT7

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

    Creating a user instrument from other two instruments NT7

    Hello,
    the goal here is to build some code I suppose on an indicator that allows us to create an instrument X like the result of multiplying two other instruments already set up in a NT 7 chart.

    The idea is to track different instruments on a different price point of view. Let's look at crude oil CL and have it multiplied with instrument 6E so as to have a chart with crude oil based on euros.

    Thought of simply creating 4 dataseries in a new indicator for open, high, low and close values of the resulting instrument X values, updating them at OnBarUpdate when BarsInProgress==1.
    Then for the Plot() function I thought of using similar technique to build GomCD_style_candlesticks at Plot().

    But thought there should be an easier way to just 'tell NT' to plot the result X of this indicator as new user_instrument so it would already be perfectly plottable as candlesticks, point and figure and so on.

    Is there a way to create a new user_Instrument and feed its data from an indicator?

    Or is there a way to treat as an instrument (at least for the plotting capabilities) the 4 dataseries OHLC resulting from an indicator?

    Thank you for your time to imagine this.

    #2
    Welcome to our forums David - have you already taken a look at KDoren's spread indicator works?



    Unfortunately you can't create a custom symbol for the spread, you would need to do all calcs in the MultiSeries indicator and then plot from there.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by f.saeidi, Yesterday, 02:09 PM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Jltarrau, Today, 05:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by kujista, Today, 06:23 AM
    0 responses
    2 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by traderqz, Yesterday, 04:32 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by f.saeidi, Today, 05:56 AM
    1 response
    6 views
    0 likes
    Last Post Jltarrau  
    Working...
    X