Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexpected NT Order Executions and Display Issues

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

    Unexpected NT Order Executions and Display Issues

    Hello,

    I'm encountering a recurring issue where NT is executing orders that don't align with my strategy logic. Previously, I faced a situation where a short trade was executed, even though my logic did not specify any short trade conditions. When I reached out to support, they mentioned a potential issue with APEX/Rithmic. However, I clarified that I use NT with Tradovate, not Rithmic. Despite this, I haven't received a response since September 13th.

    Here's a specific condition from my strategy (all conditions must be met for execution): Low[0] < VWAP().PlotVWAP[0] Despite this, the strategy executed when the low was evidently above the VWAP. (Please refer to the attached screenshot for clarity.)

    For entry logic, I utilize two sets, each with a straightforward EnterLong(4, “”) DO statement. For stops, I rely on the strategy builder's optional stop targets, using the SetStopLoss(“”, CalculationMode.Ticks, Stop, false) command.

    Additionally, there's a second issue: NT isn't displaying this anomalous trade (at 15:22) on the chart. However, I can see it in both the log (attached) and on the Tradovate platform.

    It's quite disheartening to face these challenges without understanding their root cause. Any insights or assistance would be greatly appreciated.

    Thank you.
    Attached Files

    #2
    Hello,

    Thanks for your notes.

    I see you posted about this behavior in another forum thread linked below and my colleague Chelsea requested that you send your full log and trace files in so that he may investigate this matter.

    Hello everyone, I'm running a strategy with a long only market entry and exit long. But NT entered a short position. How is this possible? // Set 1 { EnterLong(Convert.ToInt32(DefaultQuantity), &quot;&quot;); } // Set 2 { ExitLong(Convert.ToInt32(DefaultQuantity), &quot;&quot;, &quot;&quot;); } Here's the log: 9/13/2023


    Please send us your full log and trace files to scriptingsupport[at]ninjatrader[dot]com so we may investigate this further.

    In the subject of your email include ATTN: ChelseaB and in the body of the email include a link to the forum thread linked above where you originally posted your inquiry.

    Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
    • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
    • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    • Send the 2 compressed folders as attachments to this email.
    • Once complete, you can delete these compressed folders.
    We look forward to assisting further.​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello sawtooth,

      Thanks for your note.

      After further investigation, it has been brought to my attention that this post is not related to your other post regarding the strategy going short so this ticket was re-opened as requested.

      I understand that you have a NinjaScript strategy that submitted an unexpected order. A strategy will only place an order when the condition(s) to place the order becomes true.

      Have you added debugging prints to your strategy to understand exactly how your strategy's logic is behaving?

      To understand why the script is behaving as it is, such as placing orders or not placing orders when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

      In the strategy add prints (outside of any conditions) that print the values of every variable used in each condition that places an order along with the time of that bar.

      You could test reproducing the script's unexpected behavior using the Playback connection with Market Replay data to mimic the strategy running real-time and note the prints in the New > NinjaScript Output window to understand how your logic to place orders is evaluating when the unexpected order occurs.

      ​Below is a link to a forum post that demonstrates how to use prints to understand behavior.
      https://ninjatrader.com/support/foru...121#post791121

      Playback: https://ninjatrader.com/support/help...ion.htm​

      In regard to viewing the orders placed on the chart, please make sure that the 'Account' drop-down menu on Chart Trader is set to the account name that you are running the strategy on.
      Last edited by NinjaTrader_BrandonH; 09-19-2023, 11:02 AM.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

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