Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Chris L.NinjaTrader Customer Service

    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.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by quantismo, 04-17-2024, 05:13 PM
          4 responses
          30 views
          0 likes
          Last Post quantismo  
          Started by love2code2trade, 04-17-2024, 01:45 PM
          4 responses
          31 views
          0 likes
          Last Post love2code2trade  
          Started by cls71, Today, 04:45 AM
          2 responses
          10 views
          0 likes
          Last Post eDanny
          by eDanny
           
          Started by proptrade13, Today, 11:06 AM
          0 responses
          5 views
          0 likes
          Last Post proptrade13  
          Started by kulwinder73, Today, 10:31 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Erick  
          Working...
          X