Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText Panel2

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

    DrawText Panel2

    Hello,

    I want to draw from an indicator a text in panel 2 and whatever I modify in the syntax (..."true"/"false" or "y"/0/0.20.5...) it always plots at the very low (screenshot attached) and the number is cut at bottom. What do I have to change please so that the number is drawn higher in panel 2, eg at y-value 0.5 to see the number clearly?

    Now I have: Draw.Text(this, "vstrong2", false, "2", 0, 0.5, 0, Brushes. Cyan,new SimpleFont ("Arial",34), TextAlignment.Center, null,Brushes.Transparent,50);

    Thank you!
    Tony
    Attached Files
    Last edited by tonynt; 04-26-2021, 05:35 AM. Reason: incorrect translation

    #2
    Hello tonynt,

    From the syntax provided you would need to use a Price that is within the scale. The draw.Text takes a Price as its Value parameter.

    An example would be if you have the indicator applied to panel 2 and the scale has a range of 0 to 10 and you have used 0.5 as the price then it would be at the bottom of the panel. If you need it higher you need to increase the price to a price that is more in the middle of the scale like 5.

    Please let me know if i may be of further assistance.

    Comment


      #3
      Hello,

      thank you for your reply. Sorry that I cut the screenshot so that the y-axis was not visible. Here is a screenshot showing where 0.5 is. And I have in the Code the 0.5 but its plotting below.

      And have changed it now to "Draw.Text(this, "vstrong1", true, "1", 0, 1.2, 0, Brushes. Cyan,...." but see the attached screenshot please. Its plotted again at the low and cut the number.

      Thank you!
      Tony
      Attached Files

      Comment


        #4
        Hello tonynt,

        The did you verify the object has that value in the drawing objects properties after making that change? The scale you have shown would require a value of 1 to be in the middle.

        You can also try using AutoScale to see where the scale adjusts to, that would give a better idea of what the problem is.

        I have attached a script that uses the code you provided, it works for me.


        Please let me know if i may be of further assistance.
        Attached Files

        Comment


          #5
          Hello,

          I didnt know I have to add this override void... I thought I have to apply simply the numbers I see on y-axis.

          Works now.

          Thank you!
          Tony

          Comment


            #6
            Hello tonynt,

            You don't need to add that, its just to make a scale similar to what you had shown for the purpose of demonstration. the object should work the same either way based on the plotted values which make the scale that value.

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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            607 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            353 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 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
            561 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X