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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        57 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X