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

sync account position question

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

    sync account position question

    I am running some strategies which carry position for many days sometimes. Everyday I need to disconnect my computer so I turn off connection.
    So every day in the morning I reconnect computer and turn on each strategy using sync account position feature.
    Am I doing it all right?
    Another question would be. I run two strategies for the same asset, lets say GOOG.
    The first strategy "sleeps" 200 stocks long while the second 100 stocks short for a balance of 100.
    What will happen next day?
    do both strategies recognizes the 200 and -100 position??? how?

    #2
    Hello dafonseca,
    Thanks for posting today.

    You are correct in your procedure for the first question. When shutting down NinjaTrader your strategies must be stopped and restarted when NinjaTrader is restarted. Remember the strategies are operating on your computer and not at the exchange.

    When you relaunch your strategies the next day using the sync account position each strategy will only see 100 long (200 long - 100 short) for your account position. Each strategy has its own position that is monitored within the strategy and can not reference back to a previously closed strategy from the day before.

    To replicate the position you are at again you would have to run a strategy adding 100 long (back to 200 long) and another strategy adding 100 short.

    Please let us know if we may be of further assistance for anything NinjaTrader.
    Alex G.NinjaTrader Customer Service

    Comment


      #3
      I am following you but how can I add +100 to strategy 1 and -100 to strategy 2?
      should I adjust the code before openning bell. So there must be a daily adjustment, right?
      (in case both positions are carried every day).

      How can I do that? (code I mean).

      Comment


        #4
        Hello dafonseca,
        Thanks for the response.

        In reviewing my post I realized the account sync position is not going behave as I stated.

        Using the account sync position will push your strategies position to the account. So in the case of being 100 long and starting the strategy 200 long, your account position will end up 200 long. However, when you apply the second strategy, 100 short, your account will be forced into a 100 short position.

        To achieve the performance you are trying to accomplish you would need to set the sync account to false.

        If the position is the same at the start of everyday (100 long) then you would not have to adjust your strategy each day. However, if it is off this would need to be adjusted as you mentioned in the previous post for each day. The main key would be manually tracking your account position versus strategy positions that you are starting the strategy with.

        Here is a link to the help guide discussing account vs strategy position.
        http://www.ninjatrader.com/support/h..._account_p.htm

        Please let us know if we may be of further assistance for anything NinjaTrader.
        Alex G.NinjaTrader Customer Service

        Comment


          #5
          can I use "wait until flat before execution live " for some strategies and left "Immediately submit live working historical orders" to other strategies?

          Comment


            #6
            Hello dafonseca,
            Thanks for the reply.

            No, this is not possible with these settings as they are set in the Strategies tab under the Options menu and are universally applied to all strategies.

            Please let us know if we may be of further assistance for anything NinjaTrader.
            Alex G.NinjaTrader Customer Service

            Comment


              #7
              what if, I set "Immediately submit live working historical orders" and start some strategies and then set "wait until flat before execution live " and start the other.
              Will it work?
              I did it and I am seeing some yellow and some in green, but I am still not sure if it is doing all right

              Comment


                #8
                Hello dafonseca,
                Thanks for the reply.

                This would not work. Some strategies can not be enabled with "Immediately submit live working historical order" while others are "Wait until flat before execution live" by changing the settings between enabling strategies.

                What you described, shows that the steps you took however worked as expected.

                Depending on how your strategies are set up and which option you have selected. "Immediately submit live working historical orders" will submit these orders and be in a position(green). When you switch to "Wait until flat before executing live" if the strategy is in a position. based on historical data, it will show yellow as it is waiting for the position to be flat on that strategy.

                The "Immediately submit live working historical orders" will submit orders regardless of the position that a strategy is in when it becomes enabled. The strategy if it was in a position will turn green as it will becomes active. The "Wait until flat before executing live" will not submit a live trade until the strategy position is flat. If the strategy is in a position before reaching live data it will show up yellow until the strategy has reached a flat position. Then it will become active and turn green on the strategies tab.
                Alex G.NinjaTrader Customer Service

                Comment


                  #9
                  another question would be.
                  My strategy usually generates a closing position and a new inverted position at same time.
                  Of course using "Wait until flat before executing live" will allow me to enter a new position even when the system closes a old position and opens a new one simultaneously, Am I right??

                  Comment


                    #10
                    Hello dafonseca,

                    Yes this is possible using these settings. However, your strategy would not enter a live position until it generated the closed position and then enter the opposite position as a live order.

                    You would see the strategy as yellow until this position is closed and then it will become green indicating it is running live executions with the opposite position taken live.

                    If you have further questions please let us know and we can provide further assistance.
                    Alex G.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by cre8able, Yesterday, 01:16 PM
                    3 responses
                    11 views
                    0 likes
                    Last Post cre8able  
                    Started by ChartTourist, Today, 08:22 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post ChartTourist  
                    Started by LiamTwine, Today, 08:10 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post LiamTwine  
                    Started by Balage0922, Today, 07:38 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post Balage0922  
                    Started by JoMoon2024, Today, 06:56 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post JoMoon2024  
                    Working...
                    X