Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator taking very long to load

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

    Indicator taking very long to load

    Hello,
    I didn't know if I have to create a new post for each different subject. Please let me know for future questions.

    I have an indicator that plots lines for the Unirenko bars close projection. I modified it so that it will also show the next 2 bars' close or reversal levels (price).
    When loading the indicator it works but takes a very long time to load. I don't see any errors in the log.
    Anyone's advice on what the issue might be would be greatly appreciated.
    Thank you for your time.
    James
    Attached Files

    #2
    Hello James,
    Move your last bar = CurrentBar; before if block i.e. first line in on bar update. Hope it helps!

    Comment


      #3
      Hello laoshr,

      This could potentially relate to the drawing objects and use of RemoveDrawObject. In your test have you tried to temporarily comment out the drawing objects to check if that relates to the load time?

      I look forward to being of further assistance.




      Comment


        #4
        Hello s.kinra,
        I moved just the last bar = CurrentBar to the first line in OnBarUpdate but that didn't help with the loading and the only line plotted was the current price line.
        I then move the whole last bar = CurrentBar with the draw line / remove line up to the first line OnBarUpdate but the didn't help either and the only line plotted was the current price line.
        Thank you. s.kinra!


        Hello Jesse,
        I will test commenting the drawing objects and see what happens.
        Thank you for your advice.

        Comment


          #5
          Hello Jesse,
          I commented out all the Draw.Line and there was no change in load time. Any other suggestions are welcomed.
          Thank you again for your time.
          James

          Comment


            #6
            Hello laoshr,

            Do you see this when using the standard renko? If so what settings are being used?

            I look forward to being of further assistance.

            Comment


              #7
              Hello Jesse,
              I only use the UniRenko bars and I'm not sure about the NT8 Renko bars. I can give them a try.
              Thank you.
              James

              Comment


                #8
                Hello Jesse,
                I guess the issue I have with the NT renko bars is that it seems you can't use "Tick Replay" and the OrderFlow software I use needs to have tick replay checked to work.

                I did load the BarProjection indicator on and it loaded fast with the NT renko bars.
                Let me know what you think
                Thanks again for your time.
                James

                Comment


                  #9
                  Hello laoshr,

                  Thank you for the details.

                  The script should take considerably longer to load when using TickReplay. It could also relate to the orderflow being applied there as well and having to process. With the unirenko test have you tried applying just the bar projection script and nothing else on the chart?

                  I look forward to being of further assistance.

                  Comment


                    #10
                    Hello Jesse,
                    the load time is long with tick replay and is very quick without tick replay. So, the issue with loading is tick replay but is there any way to get it to load any faster, or am I stuck with the slow load time?
                    Thanks again for your time.
                    James

                    Comment


                      #11
                      Hello James,
                      Fixed it....

                      The issue lies in properties in bottom, you need a small modification. The Brushes needs to be serialized & there I found a small error. Correct it as below:-
                      Original:
                      [XmlIgnore]
                      [Display(ResourceType = typeof(Custom.Resource), Name="Current Price Color", Description="Current price line and text color.", GroupName = "1st Bar Projection", Order = 6)]
                      public System.Windows.Media.Brush CurrentPrice_LineText_Color
                      { get; set; }

                      [Browsable(false)]
                      public string CurrentPrice_LineText_ColorSerialize
                      {
                      get { return Serialize.BrushToString(CurrentPrice_LineText_Colo r); }
                      set { CurrentPrice_LineText_Color = Serialize.StringToBrush(value); }
                      }

                      Modified:
                      [XmlIgnore]
                      [Display(ResourceType = typeof(Custom.Resource), Name="Current Price Color", Description="Current price line and text color.", GroupName = "1st Bar Projection", Order = 6)]
                      public System.Windows.Media.Brush CurrentPrice_LineText_Color
                      { get; set; }

                      [Browsable(false)]
                      public string CurrentPrice_LineText_ColorSerializable
                      {
                      get { return Serialize.BrushToString(CurrentPrice_LineText_Colo r); }
                      set { CurrentPrice_LineText_Color = Serialize.StringToBrush(value); }
                      }


                      I've highlighted the change you need. You need to do this for all brushes.
                      Hope it helps!

                      Comment


                        #12
                        Hello laoshr,

                        Tick replay in general takes a lot longer to load because the script will have to process all of the ticks. There is not necessarily a way to speed that part up because you are including a lot more data than when that is disabled. The historical bars will take a lot longer to process there, you should also be able to see that by just loading a tick replay chart vs a non tick replay chart without the scripts applied, the charts will load at different speeds. Scripts will additionally take extra time to process with that enabled.

                        Please let me know if I may be of additional assistance.

                        Comment


                          #13
                          Hello s.kinra
                          Thank you for finding my errors.
                          So, this change is on all the Color lines I'm assuming. Also, would this change also be on the "get" and "set" lines as well?
                          Thank you again for your time.
                          James

                          Comment


                            #14
                            Hello James,
                            You need to replace Serialize with Serializable in 4 lines viz. line no. 259, 283, 313, 342. There is no other change. Attaching one snapshot highlighting change. Nothing else needs to be changed.
                            Hope it helps!

                            Comment


                              #15
                              s.kinra. Thanks.
                              I made the changes and it looks like the Tick Replay is the main reason for the loading issue now.
                              From what Jesse stated above it looks as if this is as good as it gets when using the "Tick Replay".
                              Thanks again for all your time in helping with this.
                              Everyone on here is awesome.
                              James

                              Comment

                              Latest Posts

                              Collapse

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