Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

limit orders reversal

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

    limit orders reversal

    Hello everyone. I would like to request support on this easy question... When I use EnterShort() or EnterLong() commands the strategy reverses the position - no rush here. But I do want to use EnterShortLimit() and EnterLongLimit() and it simple DOES NOT reverse anything! How can it be handled?

    thanks!

    Code:
        
    private IOrder entryLongOrder 	= null;
    private IOrder entryShortOrder     = null;
    
    protected override void OnBarUpdate()
    {
      if (entryLongOrder == null && myTrigger())
    	entryLongOrder = EnterLongLimit(1, GetCurrentBid(), "Long");
      else if (entryShortOrder == null && myTrigger())
            entryShortOrder = EnterShortLimit(1, GetCurrentAsk(), "Short");
    }

    #2
    djmoura, welcome to the forums - when and how do you reset those IOrder objects then? If you run with TraceOrders enabled does it report any orders being ignored?

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for your quick reply!
      This is an example of TradeOrder output of a candle which should have reverted my position. The strategy was on a long position before it.

      Code:
      2/8/2013 3:33:13 PM Entered internal PlaceOrder() method at 2/8/2013 3:33:13 PM: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=4 LimitPrice=1512.25 StopPrice=0 SignalName='ShortEntry' FromEntrySignal=''
      2/8/2013 3:37:38 PM Entered internal PlaceOrder() method at 2/8/2013 3:37:38 PM: BarsInProgress=0 Action=SellShort OrderType=Limit Quantity=4 LimitPrice=1511.75 StopPrice=0 SignalName='ShortEntry' FromEntrySignal=''
      2/8/2013 3:59:44 PM Entered internal PlaceOrder() method at 2/8/2013 3:59:44 PM: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=4 LimitPrice=1512.75 StopPrice=0 SignalName='LongEntry' FromEntrySignal=''
      2/8/2013 3:59:44 PM Ignored PlaceOrder() method at 2/8/2013 3:59:44 PM: Action=Buy OrderType=Limit Quantity=4 LimitPrice=1512.75 StopPrice=0 SignalName='LongEntry' FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'
      Then it tries going long but the strategy is already on long position since no reversal was done.

      Comment


        #4
        djmoura, thanks. Looks to me the order is correctly placed, but then not filled with the bar? This would always be a consideration when attempting to reverse via non market orders.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Yes. I am trying to reverse via EnterLongLimit or EnterShortLimit order and hoped these to be allowed.

          Comment


            #6
            They are allowed, but you can't count on them 100% when reversing since due to their nature this could leave you unfilled. In backtesting you can try working with the liberal fill mode that we have that would be filling on touch as well, but I would not expect that to happen for your realtime orders then....
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by FrazMann, Today, 11:21 AM
            0 responses
            3 views
            0 likes
            Last Post FrazMann  
            Started by geddyisodin, Yesterday, 05:20 AM
            8 responses
            52 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            10 responses
            36 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by DayTradingDEMON, Today, 09:28 AM
            4 responses
            24 views
            0 likes
            Last Post DayTradingDEMON  
            Started by George21, Today, 10:07 AM
            1 response
            19 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X