Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execution under the market price

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

    Execution under the market price

    Hi,
    In my strategy
    I am sending a buy order and a take profit order and receive an execution of the buy order below the market price as well as an execution of the profit order at a price that is below the market price
    and for that reason the strategy gets stuck and many positions come in at the same time
    How is that possible?

    I am using market replay for the ES future, the problem occurs a few time, the time in the attached video is at: 01-12-2023 15:30:10


    You can also see in the screenshot, i print to the output the execution price and the current bid price

    Thanks​
    Attached Files

    #2
    Hello yaniv,

    Thank you for your post.

    So I may accurately assist you, please answer all of the following questions:
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.?.?.?)
    • Is this a strategy that was created in the Strategy Builder or is it an unlocked script in the NinjaScript Editor?
    • Do you receive an error on the screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
    • Is this a single-series or a multi-series script?
    • What are the NinjaScript Output results with TraceOrders enabled?
    I look forward to your reply.


    Comment


      #3
      Hi,
      Sorry for my late reply,
      1. The NinjaTrader version is :8.1.1.3 64-bit
      2. No, it a custom startegy i wrote using visual studio (it is not my first one...)
      3. No, i do not get any errors, (attached)
      4. Single Series
      5. Trace also Attached

      Thanks
      Attached Files

      Comment


        #4
        Originally posted by yaniv View Post
        Hi,
        Sorry for my late reply,
        1. The NinjaTrader version is :8.1.1.3 64-bit
        2. No, it a custom startegy i wrote using visual studio (it is not my first one...)
        3. No, i do not get any errors, (attached)
        4. Single Series
        5. Trace also Attached

        Thanks
        First, I see you are using an older version of NinjaTrader. To update to the latest version of NinjaTrader Desktop please follow the steps below.
        • Login into the NinjaTrader Account Dashboard
        • Click "Download" in the bottom left-hand corner of the sidebar
        • Next select "Download" in the "Most Recent Release" Window in the main screen
        • Once the installation had downloaded, ensure any previous version of NinjaTrader is closed before running the installation package.
          • Note: You may need to locate this in your "Downloads" folder in a Windows File Explorer
        ​Next, what are the values if you print the Last price rather than the bid price? A limit order is set to fill at the limit price or better; it seems that based on your Log information, the orders are following that rule of being filled at the limit price or better. I suggest printing the time, price, and any other values used in your conditions for entry to understand why orders are being submitted. If more orders are being submitted than expected, you may need to consider adding to your entry condition to limit the next entry if one is filled right away and if the stop/target fills quickly as well. There are ways to limit the number of entries allowed per bar in your logic, etc. if that is something you would like to add to your strategy.

        For more details on using prints to debug your script:


        I look forward to your reply.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        46 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
        66 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