Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reason='This was an exit order but no position exists to exit'

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

    Reason='This was an exit order but no position exists to exit'

    When I set my entries per direction to 100, it works fine but sometimes there will be like 20 trades in a row. I don't have enough capital for that.
    When I set it back to 1 it gives this error.

    Here's my code for the entry.

    if (CrossBelow(macdLine, signalLine, 1));
    EnterShort(1, "Down");
    ExitShortStopMarket(Close[0] + 3, "Down");
    ExitShortLimit(Close[0] - .5, "Down");​

    I have a print condition that tells me the market position. And in the output menu it keeps saying "Flat"

    (Testing this on a sim account)

    #2
    Hello unpronounceable1700,

    This is because you are submitting the exits before the entry order has filled, you need to be in a position before submitting exit orders. You would need a separate condition checking if the position is short to submit those orders. The entry order will take a short time to fill and you also have to wait for the broker to push the position update event before the targets can be active.


    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello unpronounceable1700,

      This is because you are submitting the exits before the entry order has filled, you need to be in a position before submitting exit orders. You would need a separate condition checking if the position is short to submit those orders. The entry order will take a short time to fill and you also have to wait for the broker to push the position update event before the targets can be active.

      Okay. I don't know why I missed this. This is for the short entry
      'Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'

      This all happened after I woke up to some error that I closed without looking at what it was after I had left the strategy running overnight. This had happened the day prior when I was first setting the strategy up. And after 6 PM when the market had re-opened it began working again. Does the system need to update the orders correctly, and this happens after market close?

      If so, how can I fix this. I went to another post about this problem and changed my fill resolution to highest.

      Comment


        #4
        Hello unpronounceable1700,

        That message means that your strategy is trying to submit another order in the same direction. For example your condition to enter short happened but then it happened again on the next bar, that second order is blocked because your script has its entries per direction set to a lower number like 1 contract. If you meant to submit the order in the same direction to have 2 quantity you need to increase the entries per direction. If you did not mean to do that you can ignore that message or reformat your logic so the entry order only submits one time.

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello unpronounceable1700,

          That message means that your strategy is trying to submit another order in the same direction. For example your condition to enter short happened but then it happened again on the next bar, that second order is blocked because your script has its entries per direction set to a lower number like 1 contract. If you meant to submit the order in the same direction to have 2 quantity you need to increase the entries per direction. If you did not mean to do that you can ignore that message or reformat your logic so the entry order only submits one time.
          Well there's no trades open. When I woke up, I saw an error window which I stupidly did not check and closed. I noticed the strategy wasn't working, and disabled it, noticed there was one open contract which I clicked "close" on the chart trader. And then tried to re-enable the strategy. And that's where I'm at now.
          Last edited by unpronounceable1700; 06-07-2024, 04:09 PM.

          Comment


            #6
            Hello unpronounceable1700,

            The message can be for historical or live trades, it would be impossible to say what that was for if you have now reset the strategy. If you are getting this when starting the strategy up initially its possibly the historical processing. Either way that message can be ignored, it simply means your entry condition became true multiple times either within a single bar or over the course of a few bars while you are already in a position. To avoid that message you would have to make sure your entry condition is becoming true one time per side or if the intention was multiple entries in the same direction you need to increase the entries per direction property your strategy has to allow that second trade.

            Comment


              #7
              Hello: I know this is about a different issue but I dont know how to pick a recipient because I realy dont know anybody here or the address or names when I hit post and it wants a recipient always ends there and I have to jack a post to ask my question. So when I enter a trade say a long trade (buy) it is recorded in control center in EXECUTION but when I close the order or it hits target the close (sell) does not record. When I enter an new order it recorded the entry again but not the closing record so if I buy and close, buy and close, buy and close only the buys are listed not the closes. please help

              Comment


                #8
                Hello helpwanted,

                Just for future reference, if you have new questions please make a new post in whichever sub forum fits the question. That is the "new topic" button when you get to a subforum like the strategy development sub forum. We encourage you to do that instead of replying to other posts so that we can isolate separate questions into separate threads.

                Regarding the executions, as long as an order fills there should be an execution listed in the executions tab. Were the executions realtime executions?



                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                53 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                130 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                70 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                44 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                49 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X