Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bars since new trading day - no effect

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

    bars since new trading day - no effect

    Hi,
    Why doesn't this work? It always buys on the second bar instead of waiting for 7 bars since new trading day.

    if (Bars.BarsSinceNewTradingDay >= 7);

    {
    EnterLong(Convert.ToInt32(DefaultQuantity), "");
    }​
    Attached Files

    #2
    Do you have multiple Bars objects in your strategy ? I ask this because the 7th bar in a 1-min chart is the 2nd bar in the 5-min chart.

    Comment


      #3
      no, but thanks for mentioning that. I understand BarsInProgress better now. It's a bit misleading at first glance

      Comment


        #4
        i got it to work. not sure why. have a good one

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        167 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        88 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        128 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        208 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        185 views
        0 likes
        Last Post CarlTrading  
        Working...
        X