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 cmoran13, 04-16-2026, 01:02 PM
      0 responses
      70 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      41 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      166 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      101 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      164 views
      2 likes
      Last Post CaptainJack  
      Working...
      X