Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Graphics Elements Disappearing

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

    Graphics Elements Disappearing

    Dear NinjaTrader support,

    I have encountered some strange bugs recently. When I backtest a strategy, and view the corresponding chart everything seems to be fine. However at some point the chart elements disappear randomly. If I scroll to another date, they reappear. My strategy draws average price lines, do some position coloring on the chart.

    this is the normal state:

    XM Group集团直达网址༺https://affs.click/8rkvg༻,总部在塞浦路斯,有来自全球199个国家的150万余名客户,雇佣了300多名金融领域的专业人士,受英国FSA,澳大利亚ASIC,伯利兹IFSC和塞浦路斯CySEC多方权威监管机构严格监管。XM中文官网备受信赖的经纪商,交易指数、原油和黄金的差价合约。透明实时定价、小点差和高杠杆1000倍,在XM外汇官网安心交易。开立账户即可尊享赠金、专属活动、交易比赛、跟单社区、在线教育课程等多重福利,欢迎在XM交易平台官网开户,注册,登录。


    this is the buggy state:

    XM Group集团直达网址༺https://affs.click/8rkvg༻,总部在塞浦路斯,有来自全球199个国家的150万余名客户,雇佣了300多名金融领域的专业人士,受英国FSA,澳大利亚ASIC,伯利兹IFSC和塞浦路斯CySEC多方权威监管机构严格监管。XM中文官网备受信赖的经纪商,交易指数、原油和黄金的差价合约。透明实时定价、小点差和高杠杆1000倍,在XM外汇官网安心交易。开立账户即可尊享赠金、专属活动、交易比赛、跟单社区、在线教育课程等多重福利,欢迎在XM交易平台官网开户,注册,登录。


    Do you have any idea what's causing this?
    Please help me.
    Attached Files

    #2
    vides2012, any errors you would see in the log tab as this occurs? Is this on the latest 6.5.1000.14 release version?

    It would help to review log and traces, you can send them to us via Help > Mail to Support.

    Comment


      #3
      Thanks for the reply. I'll send them tomorrow(GMT), when I get the opportunity.

      Comment


        #4
        I have tried to send the mail, though it didn't succeed due to timeout error.


        this is the uploaded log/trace, and two new screenshots

        Comment


          #5
          Thanks vides, I'm seeing two things in the logs -

          1. 2010-02-02 15:51:11:130 WARNING: Calculated stop order price for strategy 'GyertyaSMAKombiUPL' was smaller/equal 0. No stop order placed.

          > you would need to print / debug your calculated stop value

          2. 2010-02-02 15:54:04:214 Chart.ChartControl.OnPaint: Overflow error.

          > you would need to debug the values you attempt to print / draw from the strategy, most likely a divide by 0 error leading to this.

          Comment


            #6
            The same strategy did not produce these error on other charts. And even on this chart only at some point.

            these are the drawing codes in the OnOrderUpdate():

            ....
            DrawLine(lineID,false,barsSinceFirstEntry,avgPrice ,0,avgPrice,linecolor,System.Drawing.Drawing2D.Das hStyle.Solid,2);//vonal
            DrawRectangle(lineID+"Hatter",false,barsSinceFirst Entry,0,0,999999,Color.Black,backgcolor,3);
            ....

            and in the strategy onbarupdate():

            ....
            DrawLine(lineID,false,barsSinceFirstEntry,avgPrice ,0,avgPrice,Input[0]>avgPrice?Color.DarkGreen:Color.DarkRed,System.Dra wing.Drawing2D.DashStyle.Solid,2);//vonal
            ....

            Comment


              #7
              vides, the errors do not have to be continuously present - please print out the associated barsAgo and Y axis values you feed into your DrawLine calls to debug those.

              Comment


                #8
                Actually I have found the reason. The DrawRectangle function received a parameter of a rectangle from 0 to 999999, that was too large. I changed it to 99999, and now it works! I made it that large to be sure it covers all the visible background of the chart.

                Thanks!

                Comment


                  #9
                  Great you've got it resolved Vides!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  116 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  61 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  40 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  44 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  82 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X