Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry and Exit fills issue (1 tick timeframe)

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

    Entry and Exit fills issue (1 tick timeframe)

    Hello. I'm using Tick Data in my Strategy. Also I'm using entries in OnMarketDataUpdate when Ask or Bid are updating:
    if(marketDataUpdate.MarketDataType == MarketDataType.Ask || marketDataUpdate.MarketDataType == MarketDataType.Bid)

    Also, with EnterLong() I'm using Print function to pring current Ask price.

    The problem is:
    In Print (also saw it in realtime) I have Ask on f.e. 8330. I have Print with this Ask also. But trade occurs much more after on another price (8334 f.e.). Also it goes more then 200 ticks to enter the position. I have a lag minimum of 1 second and always more then 100 ticks (using 1 tick chart). What's wrong with it and how to fix it?

    Also the same issue I have on exit trade via Bid price. It always closes later, then I have Print.
    P.s.: I'm using Sim account. Will it work another if I will use real account?

    P.p.s.: I also have Enforce immediate fills option anbled.

    Thank you.

    #2
    Hi YevhenShynkarenko, thanks for your note.

    Do you have any code snippets you can share? The Sim account should behave as if it were a real account, so I do not think this is the issue.

    I look forward to hearing from you.

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi YevhenShynkarenko, thanks for your note.

      Do you have any code snippets you can share? The Sim account should behave as if it were a real account, so I do not think this is the issue.

      I look forward to hearing from you.
      Here is the screenshot whith example of issue.
      I have print in 15:32:48:0580 . This print goes from this code:

      Code:
      if(marketDataUpdate.MarketDataType == MarketDataType.Ask || marketDataUpdate.MarketDataType == MarketDataType.Bid){
      
      if(CurAsk >= PrevValue)
      {
                              Print("ENTRY\n" + askbidtime);
                              Print(string.Format("Cur Ask:= {0} Bid:= {1}", curAsk, curBid));
                              EnterLong(0, 1, "long");
      
      }
      }
      I'm using two timeframes, so I added BarsInProgress index into EnterLong.

      As you can see on the screenshot I have print which shows me Enter Long and it must be on current Ask price: 8357.25 and on Time 15:32:48:0580
      BUT. In fact we have entry only on price 8360.25 and on Time 15:32:43:054.

      The vertical blue line shows where the Print was be and where the entry must be occured. In fact we have issue with very late entry and on another price.

      How I can fix it?
      I want to remind, that I'm using 1 Tick Timeframe so in any case it must enter on the next bar... But somethig goes wrong. Thank you.

      Comment


        #4
        P.s.: The PrevValue is variable that assigned in the same code (OnMarketDataType Ask or OnMarketDataType Bid). It stores double value.

        Comment


          #5
          Hi YevhenShynkarenko, We found a duplicate ticket for this issue with my colleague Jesse. Please see his reply in your email inbox. The ticket number is 2362560.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          23 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          120 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          63 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          41 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          45 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X