Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No Positions Being created

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

    #16
    Hi Joydeep,

    Thanks for your reply,
    How do I add the instruments in the Strategy Analyzer?
    The issue is the contracts have rolled over and I do not know how to add the new contract (or roll them over) as my last message indicates.
    Also as an after thought; if I am back testing on NQ 03-12 for example, is my back testing limited from the start of the contact? is there anyway I can back test on NQ for a period longer than 3 months?

    Perhaps on the cash?

    Kind Regards,

    Ravi

    Comment


      #17
      Hello Ravi,
      The strategy analyzer shows the Instruments as defined in the Instrument List.

      Please follow the instructions below to rollover the expiration date of a futures contracts.
      • From within the NinjaTrader Control Center window select the menu Tools > Instrument Manager
      • Highlight the contract you wish to rollover in the left side of the Instrument Manager window
      • Press the ">" button (the instrument will disappear from the list)
      • Press the "<" button and the instrument should re-appear with the front month expiration date



      Once you have the necessary symbols in the Instrument List, it will show in the strategy analyzer.


      How much days of data will be used for backtest is depended on the merge policy of the instrument. If you are using MergeNonBackAdjust or MergeBackAdjust then you will get the period more than 3 months.

      Please see the section "Understanding merge policy" from here http://www.ninjatrader.com/support/h...rical_data.htm

      Please let me know if I can assist you any further.
      JoydeepNinjaTrader Customer Service

      Comment


        #18
        Hi Joydeep,

        I have updated the instruments in the list so that they correspond to the instruments in the indicator and strategy that I am trying.
        But when I run the back test it only works on the primary instrument in the indicator (the first one, NQ 06-12) rather than on both of them (not showing any positions on FDAX 03-12) and so it only shows results on the one insturment, can you confirm that the buy and sell are being taken into account (so the p&l reflects both the buy's and sells on the synthetic spread)
        Even the chart shows only the buys and sells for the one instrument.
        How can I get the performance and positons of the second instrument on the graph as well?

        Kind Regards,

        Ravi

        Comment


          #19
          Hello Ravi,
          You have to create a multi-instrument strategy to submit order to the secondary data series. You cannot submit order to a different data series by referening to an multi-instrument indicator.

          The below overload for example lets you select the data series where you want to submit the order
          EnterLong(int barsInProgressIndex, int quantity, string signalName)


          For a multi-series strategy the performance report will be consolidated and the chart will be of that of the primary series only.

          Please let me know if I can assist you any further.
          JoydeepNinjaTrader Customer Service

          Comment


            #20
            Hi Joydeep,

            So to be clear, the indicator I have has a spread, which is one instrument minus another instrument. At the moment I have and enter long () and an enter short () command in the strategy based on the where the spread is. Both commands refer to the spread.
            But what you are saying is that although my command says buy the spread it is infact only buying the primary instrument rather than buying the primary instrument and selling the secondary instrument?
            So do I have to specifically say enter long (primary instrument) and enter short (secondary instrument)?

            Kind Regards,

            Ravi

            Comment


              #21
              Hello Ravi,
              Yes, you have to specifically mention which instrument you want to buy and which instrument you want to sell.

              Code:
              if (spread condition)
              {
                EnterLong(0, DefaultQuantity, "BuyPrimary");
                EnterShort(1, DefaultQuantity, "SellSecondary");
              }
              Please let me know if I can assist you any further.
              JoydeepNinjaTrader Customer Service

              Comment


                #22
                Hi Joydeep,

                I have tried the code you suggested, in the way you have written it and also specifically outlining the instrument, like this;

                {
                EnterLong(
                0, 1, "NQ 06-12");
                EnterShort(
                1, 1, "FDAX 03-12");
                }
                But no positions are being created the Strategy is coming back with 0's accross the board, no p&l. Any ideas why this may be the case. I am not sure what the first number is, is that to specifiy which instrument according to where it is in the add () method?

                Kind Regards,
                Ravi

                Comment


                  #23
                  Hello Ravi,
                  Please make sure the strategy is also a multi-instrument strategy by adding a secondary data series in the initialize section of the code.

                  Please let me know if I can assist you any further.
                  JoydeepNinjaTrader Customer Service

                  Comment


                    #24
                    Originally posted by NinjaTrader_AdamP View Post
                    Ravi,

                    You can just use an indicator. The issue is that you cannot trade spreads in NinjaTrader without trading them synthetically. In other words, you would need to buy X shares of one stock and sell Y shares of another or something like that to trade a spread.
                    Thanks for the tips! I got it now, I guess I will have to buy X shares following your recommendations and check if the things work better for me.


                    ______
                    M4a to mp3 converter

                    Comment


                      #25
                      Hi Joydeep,

                      Thanks for the reply, I seem to be getting positions now,
                      But I am getting a differnt type of error now, it seems to be linked to FDAX 06-12,
                      When I try to bring up the indicator on the the spread NQ 06-12 - FDAX 06-12 I get nothing on the indicator (which has previously worked) but when I substitue FDAX 06-12 with NQ 06-12 the indicator populates and shows a graph. It seems that the FDAX data series may be corrupted?
                      FYI - When I bring up the data series FDAX 06-12 as a graph on its own it comes up with a graph.

                      So I am not sure why it is not working on the spread indicator, seems a bit strange to me especially as it has worked in the past, any ideas?

                      Kind Regards,

                      Ravi

                      Comment


                        #26
                        Hello Ravi,
                        Can you send the a sample of the strategy and the indicator depicting the issue at support[AT]ninjatrader[DOT]com

                        Please append Attn:Joydeep in the subject line and give a reference of this thread in the body of the email.

                        I look forward in assisting you further.
                        JoydeepNinjaTrader Customer Service

                        Comment


                          #27
                          Hi Joydeep,

                          It seems the issue was caused by the data series input in the indicator options, I didn't have the primary data series in there which seemed like it was causing the issue.
                          Thanks for your support.

                          Kind Regards,

                          Ravi

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by jpapa, Today, 07:22 AM
                          1 response
                          4 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by kevinenergy, 02-17-2023, 12:42 PM
                          116 responses
                          2,757 views
                          1 like
                          Last Post kevinenergy  
                          Started by franatas, 12-04-2023, 03:43 AM
                          7 responses
                          106 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by Jltarrau, Today, 05:57 AM
                          3 responses
                          8 views
                          0 likes
                          Last Post Jltarrau  
                          Started by f.saeidi, Today, 05:56 AM
                          2 responses
                          8 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Working...
                          X