Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New aproach: How to know the time of an entry order, even if I restart NT8 ?

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

    New aproach: How to know the time of an entry order, even if I restart NT8 ?

    Hello everyone,

    I need to know how to obtain the time of last entry order, even if I restart the NT8 or the desktop.

    I´m looking to use this information direct in my strategy. So, I need a instance that I can handling a DateTime variable. And the trade is not close: we just have the entry order.
    The final goal is to obtain MAE and MFE of the present position and the trade are not closed.​

    All sugestions are welcome !!


    #2
    Hello Eros Lima,

    Thanks for your post.

    You could consider saving the time (Time[0]) to a DateTime variable when the order is submitted.

    Or, you could consider saving the execution time to a variable by tracking the order in OnExecutionUpdate() and saving the time to a variable when the OrderState == OrderState.Filled.

    Note that the strategy would have to reprocess the order again if you restart NinjaTrader or the PC.

    See this help guide page for information about OnExecutionUpdate(): https://ninjatrader.com/support/help...tionupdate.htm

    And, see this reference sample demonstrating the use of OnExecutionUpdate(): https://ninjatrader.com/support/help...and_onexec.htm

    This thread will also be open to other community members to share their insights on the topic.
    <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
      I'd use StreamWriter to save the info, then StreamReader to retrieve it.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      63 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      40 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      22 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      25 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      51 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X