Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Render Disappearing

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

    Custom Render Disappearing

    Hello All,

    I have developed an indicator that uses a custom rendering. I am using values from another time frame and it works flawlessly when I load it onto a historical chart.

    For some reason the moment the state turns to realtime it disappears completely.

    No errors in the log, I also setup print statements to make sure the entire function was running and it runs all the way through everytime.

    Let me know if I am missing something.

    You can recreate by opening up a 15 Second and loading it.

    Thanks
    Attached Files

    #2
    Hello Vikuno1,

    I've tested the script on a 15 second ES 09-24 chart without connecting, and I am not seeing anything rendered in historical, and connected and I am not seeing anything rendered in real-time.

    "I also setup print statements to make sure the entire function was running and it runs all the way through everytime."

    Are you printing the ChartPanel.Y and ChartPanel.Height + ChartPanel.Y as well as the ChartPanel.W and print the x and y coordinates of the objects you are rendering to ensure these are in the rendered area?

    Print(string.Format("ChartPanel.W: {0}, startX: {1}, ChartPanel.Y: {2}, chartScale.H + ChartPanel.Y: {3}, startY: {3}", ChartPanel.W, startX, ChartPanel.Y, ChartPanel.H + ChartPanel.Y, startY));​

    May I have the output from the prints?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Vikuno1,

      I've tested the script on a 15 second ES 09-24 chart without connecting, and I am not seeing anything rendered in historical, and connected and I am not seeing anything rendered in real-time.

      "I also setup print statements to make sure the entire function was running and it runs all the way through everytime."

      Are you printing the ChartPanel.Y and ChartPanel.Height + ChartPanel.Y as well as the ChartPanel.W and print the x and y coordinates of the objects you are rendering to ensure these are in the rendered area?

      Print(string.Format("ChartPanel.W: {0}, startX: {1}, ChartPanel.Y: {2}, chartScale.H + ChartPanel.Y: {3}, startY: {3}", ChartPanel.W, startX, ChartPanel.Y, ChartPanel.H + ChartPanel.Y, startY));​

      May I have the output from the prints?
      It renders in front of the most recent bar always.


      you are looking at the most recent bar and there is nothing to the right?

      Comment


        #4
        Hello Vikuno1,

        I'm not seeing anything rendered on the most recent bar or to the right of it.

        May I have the output from the prints?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Here is the print as well as a picture of the render.

          ChartPanel.W: 1059, startX: 832, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783
          ChartPanel.W: 1059, startX: 873, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783
          ChartPanel.W: 1059, startX: 914, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783
          ChartPanel.W: 1059, startX: 955, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783
          ChartPanel.W: 1059, startX: 996, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783
          ChartPanel.W: 1059, startX: 1037, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 783, startY: 783

          ​Trying disconnecting to data so that the chart is frozen and then adding the indicator
          Attached Files

          Comment


            #6
            Hello Vikuno1,

            The connection was not connected when I added the indicator.

            I am seeing that your startY value is out of the viewable area.

            startY: 783 this needs to be several pixels less than chartScale.H + ChartPanel.Y: 783 to be in the viewable area.

            The viewable area stops at 783.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello Vikuno1,

              The connection was not connected when I added the indicator.

              I am seeing that your startY value is out of the viewable area.

              startY: 783 this needs to be several pixels less than chartScale.H + ChartPanel.Y: 783 to be in the viewable area.

              The viewable area stops at 783.
              Hey Chelsea, thank you for you speedy response.

              There was actually a mistake in the print statement you gave.
              "Print(string.Format("ChartPanel.W: {0}, startX: {1}, ChartPanel.Y: {2}, chartScale.H + ChartPanel.Y: {3}, startY: {3}", ChartPanel.W, startX, ChartPanel.Y, ChartPanel.H + ChartPanel.Y, startY));​"
              You used the 3rd string twice instead of using {4}

              Here is the updated Print Statement:
              ChartPanel.W: 1273, startX: 555, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 378
              ChartPanel.W: 1273, startX: 572, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 529
              ChartPanel.W: 1273, startX: 589, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 546
              ChartPanel.W: 1273, startX: 606, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 557
              ChartPanel.W: 1273, startX: 623, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 579
              ChartPanel.W: 1273, startX: 640, ChartPanel.Y: 0, chartScale.H + ChartPanel.Y: 801, startY: 467

              ​Also the part I circled in Red is the actual rendering not the candles from the chart

              Thanks!

              Comment


                #8
                Hello Vikuno1,

                Oh, good catch!

                "​Also the part I circled in Red is the actual rendering not the candles from the chart"

                I'm not clear I'm understanding. I'm not seeing anything in the circled part of the screenshot.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello Vikuno1,

                  Oh, good catch!

                  "​Also the part I circled in Red is the actual rendering not the candles from the chart"

                  I'm not clear I'm understanding. I'm not seeing anything in the circled part of the screenshot.
                  Sorry in this picture I am uploaded you don't see anything circled in red?
                  Attached Files

                  Comment


                    #10
                    Hello Vikuno1,

                    All I am able to see are the chart bars on the chart.
                    Within the red circle I am seeing a red chart bar, followed by 4 more red chart bars, and then a green chart bar.
                    I also see the horizontal crosshair line.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello Vikuno1,

                      All I am able to see are the chart bars on the chart.
                      Within the red circle I am seeing a red chart bar, followed by 4 more red chart bars, and then a green chart bar.
                      I also see the horizontal crosshair line.
                      Perfect! Everything inside of the red circle is a rendering that I have created. When the indicator is run in real time or on playback it disappears. This is what I am trying to solve. I am attaching the mock indicator again as well. Let me know if I am missing anything!
                      Attached Files

                      Comment


                        #12
                        Hello Vikuno1,

                        I'm not certain I am understanding.

                        Are you saying you are rendering the candles I am seeing on the chart and that the chart bars have been set to transparent in the Data Series window?
                        (Meaning all of the candles are rendered by the script and none of the chart bars are showing, correct?)

                        If not, how are you able to tell what is rendered by your script and what is being rendered by the ChartStyle?
                        (If you had chosen purple or a different color, this would make your custom rendering stand out)
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hello Vikuno1,

                          I'm not certain I am understanding.

                          Are you saying you are rendering the candles I am seeing on the chart and that the chart bars have been set to transparent in the Data Series window?
                          (Meaning all of the candles are rendered by the script and none of the chart bars are showing, correct?)

                          If not, how are you able to tell what is rendered by your script and what is being rendered by the ChartStyle?
                          (If you had chosen purple or a different color, this would make your custom rendering stand out)
                          Thank you for your speedy responses! Here is an updated copy that changes the color and I changed the color so the rendering pops
                          Attached Files

                          Comment


                            #14
                            Hello Vikuno1,

                            Thank you for the modification.

                            I can clearly see the purple and aqua rectangles are not the chart bars rendered by the ChartStyle now.

                            Testing on my end, I see now that you have to move the horizontal time scale range to see the rendered objects.

                            However, in real-time I am still seeing the rendered rectangles. I'm not sure I am understanding what the issue is.

                            Below is a link to a video of the test.


                            Is the issue that without adjusting the time scale range to the right of the chart bars the rectangles are not in the viewable area?
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_ChelseaB View Post
                              Hello Vikuno1,

                              Thank you for the modification.

                              I can clearly see the purple and aqua rectangles are not the chart bars rendered by the ChartStyle now.

                              Testing on my end, I see now that you have to move the horizontal time scale range to see the rendered objects.

                              However, in real-time I am still seeing the rendered rectangles. I'm not sure I am understanding what the issue is.

                              Below is a link to a video of the test.


                              Is the issue that without adjusting the time scale range to the right of the chart bars the rectangles are not in the viewable area?
                              Hey Chelsea! Thanks for the video. For some reason this weekend when I was testing as soon as the chart would start receiving data the render would disappear completely. I just tested it on my end again and for some reason now it is working flawlessly. A mystery for sure. I'll let you know if anything else breaks, sorry for the waste

                              Comment

                              Latest Posts

                              Collapse

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