Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

reference last trade

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

    reference last trade

    Does anyone know how I can reference how many bars have passed since the last trade has closed?

    Thanks,

    Safetrading

    #2
    safetrading,

    Sure. Try using BarsSinceEntry().
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      doesn't work

      Using the BarsSinceEntry() doesn't work. I think perhaps we did not understand each other. I wanted to know how to reference how many bars have passed since the last trade has closed. Once I added the following to my entry criteria, it will not accept any trade signals;

      BarsSinceEntry() > 3

      It appears the above works on the assumption that a trade is already open, and since I'm currently flat and looking for a trading opportunity, the BarsSinceEntry() > 3 never occurs.

      What I need to reference is how many bars have passed since the previous trade has closed.

      Any suggestions?

      Thanks,

      Safetrading

      Comment


        #4
        Please use BarsSinceExit() then.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        571 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X