Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ignored PlaceOrder() ...

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

    Ignored PlaceOrder() ...

    hello,

    I got an error with this text:
    Entered internal PlaceOrder() method at 2011.06.03. 14:50:00: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='Close: 1' FromEntrySignal='Open'
    Ignored PlaceOrder() method: Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName=Close: 1' FromEntrySignal='Open' Reason='There already is a matching, filled exit order in place'

    I haven't got before during the runinng, so I'd have an question, how can I avoid this error? what should I amend? what is matching (name/quantity of an execution)?

    thanks for answer. Tom

    #2
    Hi Tom, in which event sequence did you sent this PlaceOrder? Are you sure you're still in a 'Open' named position at that point in time?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,
      yes, I'm still in position Open. before it was an part-open (I don't know what is that in English) with name Open too, and it was closed properly. after that I opened again a new part-open with name Open (the sign was the same), but it was ignored the close of it. I attached the Output window text. the error in line 119.
      -if I give a new name etc. Open-1, Open-2, it will close properly-. but at other chart opened 3 times this EnterLong as scale-in, and it was closed without error message. and I'm confused and I don't understand what shouldn't match between two Orders: SignalName? Quantity? I'd like avoid this, but how?-and I didin't find any information about this in Help-
      I hope, I was understandable. thanks Tom
      Last edited by marotom; 08-16-2011, 04:41 AM.

      Comment


        #4
        Tom, thanks - it sounds like you don't scale in with different signal names but then do a scaling out exit - this would not be possible, please give the entry signals unique names (open 1, open 2 etc) so you can scale out from them as needed.

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hello,
          I’d have a question. I use 2 Bars Object in the strategy: 0 and 1. When I’d like use ExitLongStop() order method, I receive error message in output window when I use TraceOrder:
          The method was: ExitLongStop(Stop_Loss_Value); /I have tried out all the Syntax of ExitLongStop() but none of them was correct./

          a) When I call it here: if(BarsInProgress==0) {}
          - 2011.06.22. 8:30:00 Entered internal PlaceOrder() method at 2011.06.22. 8:30:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=0 LimitPrice=0 StopPrice=1,4335'3 SignalName='' FromEntrySignal=''
          - 2011.06.22. 8:30:00 Cancelled expired order: BarsInProgress=1: Order='eb78263fc9024454a87a75f042926561/Replay101' Name='Sell' State=Accepted Instrument='$EURUSD' Action=Sell Limit price=0 Stop price=1,43353 Quantity=83 Strategy='STR' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='eb78263fc9024454a87a75f042926561' Gtd='2099.12.01. 0:00:00'
          b) When I call it without: if(BarsInProgress==0) {} or here: if(BarsInProgress==1) {}
          - 2011.06.22. 8:20:00 Entered internal PlaceOrder() method at 2011.06.22. 8:20:00: BarsInProgress=1 Action=Sell OrderType=Stop Quantity=0 LimitPrice=0 StopPrice=1,4335'3 SignalName='' FromEntrySignal=''
          - 2011.06.22. 8:20:00 Cancelled expired order: BarsInProgress=0: Order='e28321bde76a40fb80da39261e936613/Replay101' Name='Sell' State=Accepted Instrument='$EURUSD' Action=Sell Limit price=0 Stop price=1,43353 Quantity=83 Strategy='STR' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='e28321bde76a40fb80da39261e936613' Gtd='2099.12.01. 0:00:00'

          When I don’t add additional Bars Object to strategie it works properly. I’m confused, what can be wrong and how can I fix it?
          Could you help? Thanks: Tom

          Comment


            #6
            Hi Tom,

            The message you highlighted in bold is not an error message. It just means the order expires. The default behavior for strategy orders is that they are cancelled if not filled on the bar they're submitted to. To change this you can set liveUntilCancelled = true for the order.

            If using multiple bar objects, you can also use ExitLongStop() advanced overload that allows specifying BarsInProgress.

            ExitLongStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName, string fromEntrySignal)

            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Hello Ryan,

              Thanks for help, it works perfectly. But pop up an another question to this theme. When I use an SetStopLoss() order that mean this is submitted as stop market order. So this is completely equivalent to ExitLongStop() method? Can I use insteed of SetStopLoss() full value ExitLongStop() method? (as can be seen in sample reference) I’d like use SetStopLoss, and I’d like the NT should send an real working ordert o the broker and the working of this should be independent of running of NT. Which has more advantages to use as StopLoss? Which could you recommend?

              Thanks for answer. Tom

              Comment


                #8
                Tom, the ExitLongStop() is not a simulated order and is a StopMar****rder just like SetStopLoss would submit. As with any orders it would depend on NT being connected live and thus able to manage your orders. What broker are you trading with currently?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Hello Bertrand,

                  I'm going to MBT. which would the best at this broker? my aim would be, when my strategie run and for some reason (eg: connection lost or error of PC) won't close the entire position using market order. So would be an StopLoss oder ExitLongStop() as "last chance" at my broker independent to my PC to protect my account. At PC error won't delete the StopLoss or ExitLongStop() order. isn't it?
                  thanks Tom

                  Comment


                    #10
                    Hello marotom,

                    Please review our Forum Post on 'Where do your orders reside?':
                    Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the


                    MB Trading
                    Orders in a state "Accepted" or "Working" are at the exchange or on MBT's servers in situations where the exchange does not have native support for an order type.
                    OCO (One Cancels Other) functionality is simulated on your local PC
                    .
                    This means as long as the orders submitted with StopLoss, ExitLongStop or any other order method is "accepted" or "working", they will remain on MBT's servers. In the event of a PC crash or disconnect, these orders will still be alive on their servers, however any OCO's functionality will not operate at this time.
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      Hello,

                      many thanks for clarify! it"s good to know it. :-)
                      let me other question. when I right understand if I programmed own order rejection handling in the OnOrderUpdate() method, should I set to RealtimeErrorHandling.TakeNoAction. isn't it? and how can I pretend the "rejected" state as generates the broker's server to check my rejection handling logic? is there a simply procedure ?
                      thanks for help.

                      Comment


                        #12
                        Correct Tom, it would only be effective with TakeNoAction, as otherwise the strategy would terminate on the rejected orderstate received.

                        I believe you could for example submit a too high qty order to your paper account so a rejection from this account would occur, then you could test how your strategy deals with this case.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Hello Bertrand!
                          Thanks for answer.
                          I'd have an another question connected with SetStopLoss(). I'm using this syntax:
                          SetStopLoss(CalculationMode mode, double value), with setting: ByStrategyPosition.
                          when I scale out, the quantity of SetStopLoss won't amend to the actual position quantity. how can I set the quantity of SetStopLoss will reflect the actuall size of position using this syntax? or is it unrelated the Qty? I've tried to monitor the actually Qty of it, (IOrder_StopLoss = SetStopLoss(CalculationMode.Ticks...,) but I can't pass the value of the SetStopLoss to the IOrder object . is it possible? if yes how?
                          Thanks for answer.
                          Last edited by marotom; 08-31-2011, 06:08 AM.

                          Comment


                            #14
                            Hi Tom, if you work with the Set() method and would like to scale out, it would be needed to scale in first so you basically refer to unique positions representing your scale qty's :

                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Hello,

                              When I create a text file with StreamWriter, and during the running of strategy will this file 0 byte and I can't able to retrieve the recorded data only that case, when the strategy is reseted. how can I retrieve the recorded data during the running of the strategy?
                              thanks for answer.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by MacDad, 02-25-2024, 11:48 PM
                              7 responses
                              157 views
                              0 likes
                              Last Post loganjarosz123  
                              Started by Belfortbucks, Today, 09:29 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Belfortbucks  
                              Started by zstheorist, Today, 07:52 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post zstheorist  
                              Started by pmachiraju, 11-01-2023, 04:46 AM
                              8 responses
                              151 views
                              0 likes
                              Last Post rehmans
                              by rehmans
                               
                              Started by mattbsea, Today, 05:44 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post mattbsea  
                              Working...
                              X