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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X