Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order execution error in ZB and RTY contracts

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

    Order execution error in ZB and RTY contracts

    I use daily RTH session bars for a strategy that occasionally, mostly in the ZB and RTY contracts, takes a Tuesday opening market trade based on previous day Monday bar .. which is correct... but then applies the same trade on Wednesday... marking the execution the same and applying the same stops/targets as it did on Tuesday. This error happens occasionally, and I have employed the following code to counter it... which is not solving the problem. Any ideas on what string could make sure that the Previous day OHLC is the correct one at all times? I run the latest NT8. Regards

    && Time[0].Date == DateTime.Today



    #2
    Hello elliot5,

    Thank you for your post.

    Would you be able to post a sample of the current entry conditions you have in your for the trade?

    And if I'm understanding correctly, it sometimes does work as you intended, is that correct?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Yes it sometimes works - but ZB has consistently repeated the previous days trade despite orders being cancelled via an unmanaged approach.


      if (Positions[0].MarketPosition == MarketPosition.Flat
      && Time[0].Date == DateTime.Today
      && Bars.PercentComplete > 0.0001
      && PriorDayOHLC(Opens[0]).PriorOpen[0] < PriorDayOHLC(Closes[0]).PriorClose[0]
      && CurrentDayOHL(Opens[0]).CurrentOpen[0] < PriorDayOHLC(Closes[0]).PriorOpen[0]
      && State != State.Historical
      && USShorts == true)

      && Time[0].Date.Day != HolidayUS


      && Bars.TickCount <100)

      {
      EnterShort(0,5, "ZB Short");
      }

      Comment


        #4
        Hello elliot5,

        Thank you for your reply.

        I don't see anything incorrect there. Would you be able to supply a stripped down version of your strategy for testing? If you are uncomfortable posting it to the forums, you can send it via email to platformsupport [at] ninjatrader [dot] com. If you do so, please include 2414371 Attn Kate W. in the subject line and a link to this post in the body. You may omit any code unnecessary for recreating the behavior.

        Thanks in advance; I look forward to assisting you further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X