Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print only once "onBarUpdate"

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

    Print only once "onBarUpdate"

    Hi
    I have a custom indicator that is calculated OnEachTick. If a condition is met, The indicator prints a statement to the output window. Because it is calculated onEachTick, it iteratively prints the statement as long as the condition is met during the bar duration. Is there any trick to make the script print only once if the condition is met?
    Thank you for your support.

    #2
    Hi MSerag, thank for writing in. There is a technique where you keep track of the current bar being processed. I have an example of this here in the builder. You can unlock this code to see how it works in C#:

    Hi, I'm currently working on a strategy that is utilizing OnTickChange data using the linked method. I am using a Tick Chart. The strategy uses onTickChange to make intrabar entry, and does so fine with the Set1 and Set2, but if/when profit target is hit, it will submit another order after the profit target if the


    Kind regards,
    -ChrisL​

    Comment


      #3
      Hi Chris, the link guided me to CSS Examples response where I could not find the code. Would you please check whether this is the correct link? Thank you.

      Comment


        #4
        Hi MSerag, please see post Number 9 on that link that I sent earlier.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        630 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        566 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X