Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom instruments

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

    Custom instruments

    hi

    I have a spread trading strategy.

    Spread = Closes[2][0] - Closes[1][0];

    I've created the above as an indicator. It tells me the spread between two instruments. Currently, when the spread goes out of wack, I buy/sell the underlying instruments. For example, if spread increased, I will buy instrument 1, and sell instrument 2 simultaneously. But this is a very manual process. I could automate this strategy with ease, but I am curious, If there is a way to create a instrument, where the values for the instruments are the underlying spread (Spread = Closes[2][0] - Closes[1][0] ). Then when I load that instrument (Spread = Closes[2][0] - Closes[1][0] ) on the chart, I can simply go long/short the spread, and as a result, NT automatically shorts & longs the underlying instruments. Essentially, is there a way to create custom baskets of instruments?

    Thanks!

    #2
    Hello calhawk01,

    This is possible by making a custom bar type.

    However, this is not supported by NinjaTrader support to do. (Meaning we cannot assist with this, but this forum thread will remain open for the community to assist you)

    To get started, take a look at the Documents\NinjaTrader 7\bin\Custom\Type\@BarTypes.cs file.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Better yet, doesn't NT support quotes on calender spreads? I believe those are tradable instruments?

      Comment


        #4
        Hello calhawk01,

        NinjaTrader can trade Futures, Forex, and Equities.

        Is this instrument one of these instrument types?

        If not, it will not be tradable by NinjaTrader.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          ok so i got a solution for this, but going to need some help.

          CGQ continuum does indeed support spread symbols. All that needs to be done is that I had to create a new instrument under the settings and provide the correct mapping for the spread to the CGQ/NT servers.

          For example for CL spread, do this:

          1) add new instrument, under misc, mapping is : CLES12
          2) then select future expiration date.
          3) then you should be able to get quotes on the above

          Apparently, historical data for these spread is not supported. So then you have to go to settings and turn off historical data from your provider. Else you will get an error when you load this to the chart. At this point, I dont get an error but I do not get any chartable data either. What can I do? I am getting the quotes in level 1...

          it mostly depends on the type of spread. if you want to construct a synthetic quote, its mostly the same, eg a bean/corn spread would use map 'ZCEH5-ZSE' for march. Again you would have to update the 'H5' part as you roll over. For native spreads its as simple as finding the symbol and plugging it into a new futures instrument, eg HOECLE RBECLE QPQO etc, will all work and be tradeable as well. Spreads that will not work are some calendars, bufferflies, packs and some strips. basically anything …


          for your reference.

          Comment


            #6
            Hello calhawk01,

            These symbols are not supported by NinjaTrader so you are in uncharted territory I cannot assist with.

            However, this thread will remain open for any community members that would like to contribute.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello calhawk01,

              These symbols are not supported by NinjaTrader so you are in uncharted territory I cannot assist with.

              However, this thread will remain open for any community members that would like to contribute.
              What do you mean these are not supported? I'm able to add these symbols, link the mapping to continuum, and then also submit my orders to buy/sell. I don't understand when you say these are not supported. There is data and trades are being executed. What isn't supported I guess is the historical data? Can't you guys think of a solution for this? Spread trading is a big game for future traders.

              Comment


                #8
                Hello calhawk01,

                By not supported I mean that NinjaTrader is not designed to work with these instrument types. The NinjaTrader support cannot assist when using NinjaTrader in a way it is not designed to work.

                This is why they are not pre-mapped in NinjaTrader.

                Below is a link to the supported instruments with NinjaTrader Continuum.
                https://www.ninjatraderbrokerage.com...ilable_markets

                If the instrument is not on this list, it is not designed to work with NinjaTrader and NinjaTrader Continuum.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi,

                  I'm using the Continuum demo account. And would need to access the CL future. The Continuum data is fine if I use the continuous CL contract. But if I try accessing a spesific one I get the error message CLZ5 (or CLQ5) not enabled for realtime quotes and trading.

                  Double checked that CL is supported as listed below. How do I enable all of the CL's for real time quotes?

                  Originally posted by NinjaTrader_ChelseaB View Post

                  Below is a link to the supported instruments with NinjaTrader Continuum.
                  https://www.ninjatraderbrokerage.com...ilable_markets
                  Thx,
                  Eelofi

                  Comment


                    #10
                    Hello Eelofi,

                    Thank you for your note.

                    Yes, the CL is supported by the NinjaTrader.

                    CLZ5 would be CL 12-15 and CLQ5 would be CL 08-15. These are both available through the demo.

                    You may be using an older version of NinjaTrader or you may have upgraded from an older version of NinjaTrader and have not yet performed an instrument reset.
                    • Shutdown NinjaTrader
                    • Download NinjaTrader from the link below
                    • Click here to download NinjaTrader
                    • Double click the downloaded file to execute it
                    • Follow the on screen instructions
                    • Restart NinjaTrader


                    You will also want to reset your instruments as well. This will pull in any newly mapped instruments, and updated rollover dates.
                    To do this:
                    • Disconnect from any connections
                    • Click Tools -> Options... -> select the Data tab
                    • Click the Reset Instruments button -> Restart NinjaTrader


                    Please let me know if this does not correct the issue.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Thx Chelsea,

                      that solved the problem. Now I'm getting the same error message with BRN (ICE Brent Crude Future ). Any ideas why?

                      Error: CQG.Adapter.SubscribedMarketDataResolve: QOU5 not enabled for realtime quotes and trading.

                      BR,
                      Eelofi

                      Comment


                        #12
                        Hello Eelofi,

                        The BRN future is not available with the NinjaTrader Continuum Demo, but can be traded with a funded account.

                        (Not all instruments are available to the demo)
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          OK, is there a listing somewhere which symbols are available in the demo?

                          Thx,
                          Eelofi

                          Comment


                            #14
                            Hello,

                            The instruments available to demo are subject to change and do change from time to time.

                            Basically the most popular instruments are available but I would not be able to provide you a list as this could change at any time.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Has this been tried in NT8? I set up a new instrument called CLES1 to trade the CQG crude oil calendar spreads, but can't seem to be able to add a new instrument for the 06-17 to 07-17 spread. I tried CLES1 06-17, CLES1N17, CLESM-CLESN.... it just keeps saying Invalid Instrument Name.

                              Thanks!
                              Bryan
                              cassb
                              NinjaTrader Ecosystem Vendor - Logical Forex

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Christopher_R, Today, 12:29 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post Christopher_R  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              166 responses
                              2,235 views
                              0 likes
                              Last Post sidlercom80  
                              Started by thread, Yesterday, 11:58 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post thread
                              by thread
                               
                              Started by jclose, Yesterday, 09:37 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,415 views
                              0 likes
                              Last Post Traderontheroad  
                              Working...
                              X