Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with the real-time update of a Custom Indicator

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

    Problems with the real-time update of a Custom Indicator

    Good afternoon,

    I'm having trouble with a custom indicator I created to draw arrows and send prints to the Output window.
    The indicator runs in Calculate.OnEachTick mode.
    When I launch it, it runs correctly, draws the arrows on the chart, and prints the data correctly in the Output window.
    The problem is that, when it runs in real time, it doesn't print any additional data or draw more arrows. I have to constantly press F5 to update it.
    What could be the problem?

    Thank you very much in advance for your help.​

    #2
    Hello BIOK.NT,

    Have you used a Print to check how it works in realtime vs historical? Pressing F5 just means it reloads and re processes that data as historical OnBarClose. OnEachTick is only used for realtime bars so it sounds like your logic is working differently with OnEachTick. you may want to use OnBarClose in realtime and see if that works as expected.

    Comment


      #3
      Hi Jesse,
      Thanks for your prompt response.
      Yes, I use Print to see what the indicator logic does historically.
      When I load it, it prints the data and historical arrows correctly, but in real-time execution, it doesn't do anything.
      I've tried changing the Calculate mode to OnBarClose, but that doesn't work either...
      What else can I do?
      I really appreciate your help.​

      Comment


        #4
        Hello BIOK.NT,

        You need to also use the prints in realtime to see what its doing in realtime. You have custom logic so you would have to output what its doing in both use cases to know how that logic works in both use cases.

        Comment


          #5
          What is the difference between Historical Prints and Realtime Prints?

          Comment


            #6
            Hello BIOK.NT,

            Print is just a way to output information. That works in all modes.

            To know why your script is working different you have to trace how its logic worked historically where it was what you expected and then also in realtime to see what happened unexpectedly.

            Comment


              #7
              The fact is that nothing is printed nor drawn when the indicator runs.
              The output only prints past logic.
              The logic is executes correctly in the past but when it runs, stops printing and drawing.

              Comment


                #8
                Hello BIOK.NT,

                That means your condition is not true, you have to add more prints to see why that area of logic is not happening. There is not a way to solve this question without debugging that use case.

                For example if you have a condition

                if(something)
                {
                Print("here");
                }

                and that is not working, you need to move the print and see what is happening:

                Print(something);
                if(something)
                {

                }​

                Comment


                  #9
                  I may not explain myself correctly.
                  The logic of the indicator is correct. Works properly when I run it. The output shows the Prints correct when it is loaded in the chart, but then, stops printing in the Output window and dwawing in the chart.

                  Comment


                    #10
                    Hello BIOK.NT,

                    When you load it in the chart the indicator processes the data as historical up to the current bar. That is one half of the test. Realtime is different especially when using OnEachTick. You also have to use prints in realtime and see if the logic and values are similar to what you observed in historical. If you get no prints you have to move them as demonstrated in my last post until you start getting prints, then look what values are used at that point that are causing the logic past that point to not execute.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    557 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    324 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
                    545 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    547 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X