Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rectangle with prices as text in price axis

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

    Rectangle with prices as text in price axis

    Hi,

    I am developing an indicator for which I need to know the price in form of text in the right hand side price axis for e.g tops of bottoms of manually drawn rectangles or regions. Is there a way to do so ? Like by creating a new custom object that inherits from rectangle object? Do you have such code examples in c# ?

    Thanks in advance,

    Yoan​

    #2
    Hello z679Gju,

    When you say prices as text, do you mean prices in the form of a word like four?

    There is not a way to draw inside the price axis, you could draw to the left of the axis inside the chart with custom rendering. The only way to have text in the right side price axis is to format the price marker for a plot, you would plot a value and then use the FormatPriceMarker override to return text instead.

    Code:
    public override string FormatPriceMarker(double price)
    {
        return "SomeText";
    }

    Comment


      #3
      Thanks Jesse. I actually meant drawing the top value and bottom value of a rectangle like if the top is at 2.34$ and bottom at 2$, draw 2.34$ and 2$ in the price axis (left or right). Would your method be a good candidate for that?

      Comment


        #4
        Hello z679Gju,

        To draw anything in the right side axis it would have to be plotted data so if you wanted to draw a rectangle between two prices you would need two plots that represent those prices. Once the two plots are added a price marker is added on the right side. If you want the price marker to just display a price nothing else is required, if you wanted custom text you can use the override mentioned previously.

        Comment


          #5
          Thanks Jesse for your answer. In that case, I think I will try to just print text that matches top and bottom of all rectangles towards the right side but not on the price scale.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          560 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          325 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
          547 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