Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Long trade, executing shorts

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

    Long trade, executing shorts

    I have made a stragedy that only gets into long positions, and works while
    it is being back tested, when I go live it enters short trades , and I am not
    sure why or on what params it is doing so , do I need to specify not to enter a short? or somthing along those lines?

    #2
    The strategy will go short when any of the EnterShort() methods are called. I assume you have within your strategy, EnterShort() calls? If you do, I would remove them.
    RayNinjaTrader Customer Service

    Comment


      #3
      nope no entershort

      Thats why I'm confused on why this is happening, the back testing doesn't get into any like it shouldn't , but whern i go live it does I could
      post it if you like

      Comment


        #4
        btw

        I am using the wizard

        Comment


          #5
          In your strategy (using the wizard), do you have actions to EnterShort() ? If yes, please remove them. Then for sure your strategy will not go short.

          If you ONLY have EnterLong() methods, then let me know.
          RayNinjaTrader Customer Service

          Comment


            #6
            I only have long

            in OnBarUpdate()
            I only have EnterLong() and ExitLong() on condition
            nothing about shorts

            Comment


              #7
              Where do you determine that the strategy is going short?

              Thanks.
              RayNinjaTrader Customer Service

              Comment


                #8
                in controlceneter

                In the Control Center under positions, under the tab Side, it says Short
                I'm assuming that means its entering a short along with it entering longs in the same column

                Comment


                  #9
                  That is your account position, not your strategy's position.

                  For example, you can be 5 long in your account, then your strategy runs and is short 1 putting your account at 4 long.

                  I assume you are trading in Sim101 account? If yes, clear out this account via Tools > Options > Simulator > Reset.

                  Then the next time you run your strategy, immediately check your "Strategies" tab to see what the current position of the strategy is. If its NOT flat, you can then optionally choose to synchronize your actual account the strategy is trading on with the strategy itself by manually placing a market order in the Control Center Orders tab.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    ok

                    Yes I'm using the Sim101 acct, I test one stragedy at a time across multi forex markets , optimize on each, I reset between each test
                    is it possible to get other positions open then the ones from the
                    stagedies that I'm running? doesn't the stragedy open the positions?

                    Comment


                      #11
                      Sure, you could place orders manually.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        Still happening

                        How am I ending up in a short position when I'm only executing long trade in my stragedy? if you explained it earlier I'm sorry for the reduntancy

                        Comment


                          #13
                          Only you can determine how your account position goes short.

                          - Clear your Sim101 account
                          - Ensure your account is flat
                          - Run your strategy(s)
                          - Monitor the trades they take, watch the executions tab for fills, watch your account position

                          This is a debug process to help you understand what is happening.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            heh k

                            thats what I've been doin , is it possible to do a recompile to make sure I have the lastest code? like can I delete the old objects and make new ones to put in the dll?

                            Comment


                              #15
                              Sure, just go to Tools > Edit NinjaScript, select your strategy and compile it.
                              RayNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cre8able, Yesterday, 07:24 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by cocoescala, 10-12-2018, 11:02 PM
                              6 responses
                              939 views
                              0 likes
                              Last Post Jquiroz1975  
                              Started by gbourque, Today, 06:39 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by cmtjoancolmenero, Yesterday, 03:58 PM
                              1 response
                              17 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by benmarkal, Yesterday, 12:52 PM
                              3 responses
                              23 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X