Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawLine not happening

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

    DrawLine not happening

    Can anyone see an obvious reason why this drawline wouldnt work?

    Code:
    DrawLine("MFE Profit" + CurrentBar, true, longBar, longPriceWatch, CurrentBar, MAX(High,CurrentBar - longBar)[0] -1 * TickSize, Color.Green,DashStyle.DashDot,1);
    If checked it in Visual Studio and its getting hit and the values look good but im not seeing it on the chart and cant think why?

    #2
    Hello GKonheiser,

    Thanks for your post.

    Do you see any errors in your log tab of the control center that relate to the indicator?

    Not knowing your values I did:
    Code:
    DrawLine("MFE Profit" + CurrentBar, true, 10, Low[0], CurrentBar, MAX(High,CurrentBar - 10)[0] -1 * TickSize, Color.Green,DashStyle.DashDot,1);
    and drew a million lines.

    You could use Print statements just before the drawline to assess the values for longBar, longPricewatch and MAX(High,CurrentBar-LongBar)[0] -1*TickSize to assess the values.

    Please let me know if this helps to resolve the issue.

    Comment


      #3
      Hi Paul,

      I will put in a Print statement but as I said I check the values manually with Visual Studio.

      Get back to you in a sec.

      Comment


        #4
        Output looks OK:- see attached
        Attached Files

        Comment


          #5
          Hello GKonheiser,

          Thanks for your posts and I agree the values seem reasonable.

          How have you set "DrawOnPricePanel", true or false?

          Comment


            #6
            Hi Paul,

            I have other objects that draw fine on the price panel, I haven't set DrawOnPricePannel to false. It's a bit of a mystery but I bet its something simple.

            Comment


              #7
              Ive been looking at this at the weekend and cant find a reason why it isn't drawing and not sure how else to debug it?

              Comment


                #8
                Hi Paul,

                Ive found the problem, I am using the raw bar count and not the bars ago index.

                Comment


                  #9
                  Thanks for letting us know GKonheiser, glad to hear.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  558 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