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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        63 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
        54 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        61 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        48 views
        0 likes
        Last Post CarlTrading  
        Working...
        X