Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to check if 2 losses are on the same day

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

    how to check if 2 losses are on the same day

    Hi

    how would one program this condition

    IF last 2 trades are on same day AND both are losses THEN dont trade until next day

    Thanks

    #2
    We have a sample working with the Performance class for this, it would only need a slight modification for your case -

    Comment


      #3
      Thanks for the reply

      3 questions :

      1) Performance.AllTrades.Count : does this count a trade that has entry at a prior date and exit today ?

      2) how do I express the "in the same day" condition. What is the best/simplest way to do it in NT ?

      3) What is the difference between Performance.Alltrades and Performance.RealtimeTrades ? aren't all trades in a working (live) strategy real time trades ?

      Thanks

      Comment


        #4
        1. Yes, all trades includes historical and realtime trades done by the strategy.

        2. Please take a look at the sample code provided, if you have a session break save the count to know at which point the transition to today occured.

        3. AllTrades are historical and realtime trades, realtime trades only the ones taken as the strategy was running live.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        65 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Working...
        X