Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator with COBC on a daily chart

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

    indicator with COBC on a daily chart

    Hi,

    I have a custom indicator, that is coded using COBC. It has 3000+ lines of code, does extensive calculations and draws a lot of objects on the chart.
    The signals/drawing objects for the last bar on the chart appear when the next bar opens, as you know, which would be the open of the day of the next day.

    At the moment I have to set that indicator to calculate on price change after the market has closed to see the signals for the last bar.
    Is there a permanent workaround for that?

    Best regards
    Thomas

    #2
    Hello td_910,

    Thank you for your post.

    You could try setting the indicator to calculate OnPriceChange, and then modifying most of your logic to calculate on the first tick of the bar. You could then use a SessionIterator to find the end time of the session, and compare that time to the current bar time - if the current bar time coincides with the end of the session, calculate that bar only using OnPriceChange. This would likely require you to change references in your script to reference the previous bar when calculating on the first tick of the newly forming bar, which may be quite a bit of work given you've said this is a rather large indicator.

    It's likely simpler overall to set it to OnPriceChange once the market ends, but it would be possible.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello td_910,

      Thank you for your post.

      You could try setting the indicator to calculate OnPriceChange, and then modifying most of your logic to calculate on the first tick of the bar. You could then use a SessionIterator to find the end time of the session, and compare that time to the current bar time - if the current bar time coincides with the end of the session, calculate that bar only using OnPriceChange. This would likely require you to change references in your script to reference the previous bar when calculating on the first tick of the newly forming bar, which may be quite a bit of work given you've said this is a rather large indicator.

      It's likely simpler overall to set it to OnPriceChange once the market ends, but it would be possible.

      Please let us know if we may be of further assistance to you.
      Thank you, I'll have a look.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X