Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Positions are "not in balance" at strategy start

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

    Positions are "not in balance" at strategy start

    "This may result in problems sending live orders". And it surely does result in problems. Despite the fact that Sell order is clearly dependent on a specific Buy, it goes Short when Sell triggered, and instead of Buy, it Buys to Cover.
    What am I missing here?

    Need urgent help. Thanks.

    #2
    Hi Frantz, welcome to our support forums! You would need to ensure your account and strategy position are in sync when the strategy is started, for more info please review this link - http://www.ninjatrader-support.com/H...tPosition.html

    Comment


      #3
      Thanks. Not really convenient (and sometimes not enough time) to bring it in sync manually especially if you you launch several strategies in the middle of the session and have to manually bring them in sync.

      I guess I have to read more on this: "You want to run a strategy and at the same time trade the same market the strategy is running on using discretionary tactics through one of NinjaTrader’s advanced order entry window such as the SuperDOM or Chart Trader".

      Will SuperDOM or Chart Trader allow me to trade manually similar strategy or correct strategy by entering manual orders running an automated strategy in parallel?

      Is there any way to build some kind of logic that if the strategy and account are out of sync, then strategy would fire up the trades only after account and strategy are in sync?



      Thanks.

      Comment


        #4
        Sure, you can also use the ChartTrader or SuperDOM to sync the account position to the strategy one. Another option would be to set the strategy execution to 'wait until it's flat' and then start executing live. You can do so in the Strategies tab (Tools > Options > Strategies > NinjaScript) > http://www.ninjatrader-support.com/H...tegiesTab.html

        Comment


          #5
          Thanks. I missed this one.

          Comment


            #6
            Wait until Flat problem

            I have a strategy that I am testing which is always in the market, (never flat) and also has named entries and exits. It appears that when I launch the strategy in the middle of a session I cannot ever synch it because of the named entries. If I put in a manual entry to match the strategy position, (call it long two contracts), both of these entries are named in the strategy but not named during the market entry, so they are not taken out when it is time to sell one or more of the contracts. Is there a way around this problem?
            DaveN

            Comment


              #7
              Daven,

              I am not sure I understand you on the naming concerns. Wait until Flat doesn't really matter what you name your orders. As long as your strategy reaches or crosses a flat state is when your strategy will begin trading.

              Also, manual trades do not influence the strategy position.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                More detail

                Let me describe the problem with an example. I have a simple strategy that goes long or short but is never flat. I place an order for two contracts as separate orders, LongA and LongB, (or the short equivalent for the opposite direction). When the strategy is running properly, once the unrealized profit is above $100 for the ES, I take off one contract "LongA" with an order called "LongA_X". I'm left with a one contract runner, that comes off when the strategy closes off the long. The problem occurs when the strategy is turned on, and already has a virtual 2 contract long in place. If I add two contracts by separate orders, they are unnamed, so when the strategy tries to close the first contract at a profit, it works virtually in the strategy, but there is no named order called "LongA" since it was physically never placed by the strategy. What I see when I run in replay, is a constant toggling of contracts that up and down, adding one incrementally, so when I look at the results I see I am long or short 18 contracts or so. That is not what the strategy should give me, but it affects back-testing, as well as running on replay. It appears that if I have a named order I can only take that order off by finding it as a named order with the strategy, or just close everything. Is there a more elegant way to fix this startup mismatch. Right now, I have timed the strategy so it starts after 8:15 AM every morning and I make sure it is in place before that time so I won't have the mismatch problem. Not elegant but it does work.
                DaveN

                Comment


                  #9
                  Daven,

                  Not following you. If your strategy placed virtual trades named LongA and LongB they do exist. When your strategy is in Wait until flat mode all further trades are done virtually. I do not see why this is a concern.

                  As you start up and there is a strategy position, you do NOT submit any manual orders. Your strategy does not just pick up a manual order and attaches it to a virtual order. Your strategy will stay virtual UNTIL it reaches a flat state and then it will submit live orders. There is nothing for you to intervene with.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by abelsheila, 05-14-2025, 07:38 PM
                  2 responses
                  45 views
                  0 likes
                  Last Post hglover945  
                  Started by nailz420, 05-14-2025, 09:14 AM
                  1 response
                  95 views
                  0 likes
                  Last Post NinjaTrader_ChristopherJ  
                  Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
                  0 responses
                  468 views
                  1 like
                  Last Post NinjaTrader_Brett  
                  Started by domjabs, 05-12-2025, 01:55 PM
                  2 responses
                  79 views
                  0 likes
                  Last Post domjabs
                  by domjabs
                   
                  Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
                  1 response
                  111 views
                  0 likes
                  Last Post NinjaTrader_ChristopherJ  
                  Working...
                  X