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

charting a futures pair?

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

    charting a futures pair?

    Is there a way to chart a futures pair? For example 50*ES-6*/YM or PEP- 3*KO (multiplication to make them notionally equal)

    #2
    Hi waterman, thanks for posting. See the Spread indicator here:

    This is a conversion of the Spread Indicator with Candlesticks. Please contact the original author for any questions or comments.


    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chris,

      Is there a way to apply other indicators or a system to the Spread Indicator?

      Comment


        #4
        Hi waterman, you can use the Spread indicator in a Strategy. All the strategy needs to do is add the same data series you pass into the Spread indicator and create the Spread object similar to the SMA objects in the SampleMACrossover strategy. To apply an indicator to it, you can select any indicator in the Spread settings under the "Input Series".

        Kind regards,
        -ChrisL​
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Chris, would all of my strategies be "tweeked" to allow them to work with the Spread Indicator??? BTW I've approached several programmers with doing this (creating a chart of an intermarket futures spread ...ie Crude Gas CL RB.......and applying a strategy to the spread candles.)...but none of the programmers seem to get it or say it's impossible. Am I not explaining it correctly?

          Comment


            #6
            Hi, the spread indicator can be used in a strategy. See here for documentation on initializing indicators in other scripts. Since the Spread indicator is using AddDataSeries() to add another series, the hosting strategy will also need to add the exact same data series.

            https://ninjatrader.com/support/help...tm#Performance //see "Referencing indicator methods"
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Hey Chris...thank you. I ran this past the programmer I hired (who also wrote the strategy I want to apply to the spread) He said it would take 8 hrs to apply the strategy to the pairs.
              I know this might be an awkward question....but you make it seem like an easy process....should it take that long?

              Comment


                #8
                Hi waterman, thanks for the follow up. It depends on the current status of the code. Adding a data series can mean you would need to re-structure the entire OnBarUpdate method, so it can take 20 minutes or it could take 8 hours, it really depends on what the code is doing.
                Chris L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Gmonte, 10-01-2022, 08:28 AM
                2 responses
                186 views
                0 likes
                Last Post charlesthomas  
                Started by ETFVoyageur, 05-18-2024, 12:45 AM
                5 responses
                31 views
                0 likes
                Last Post ETFVoyageur  
                Started by Kraken29, Today, 03:24 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by Skifree, Today, 11:47 AM
                5 responses
                19 views
                0 likes
                Last Post Skifree
                by Skifree
                 
                Started by ETFVoyageur, Today, 10:34 AM
                10 responses
                25 views
                0 likes
                Last Post ETFVoyageur  
                Working...
                X