Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars Since Entry

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

    Bars Since Entry

    Hello,

    I've seen BarsSinceEntry().

    Is there a similar "BarsSinceOrderPlacement()" for stop or stoplimit orders before orderstate becomes filled?

    Thanks,
    Kirk

    #2
    Hi zeller4,

    There's no method explicitly for that, however, you can track the bars since your order was submitted manually, by setting a variable to CurrentBar. The CancelOrder shows an example of this type of tracking.

    TimNinjaTrader Customer Service

    Comment


      #3
      I've used BarsSinceEntry() successfully and notice that it starts at zero on a new trade. However, when a trade hits a stop or target and is no longer active and the IOrder name is reset to null, the BarsSinceEntry continues to count up. It only resets once a new trade is placed.

      Is there something else required to reset this?

      Kirk

      Comment


        #4
        Kirk, the BarsSinceEntry() method will only reset when a new trade is placed. If you are looking to track exits, please use the BarsSinceExit() method instead.
        AustinNinjaTrader 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