Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar's range in text above or below the bar?

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

    Bar's range in text above or below the bar?

    How can I plot text of the bar's range on the chart? I would like the range to be plotted under the low on upticks and above the high on downticks.

    #2
    something like that. u might have to round "barrange" up or down or convert it into a real number depending on what instrument your looking at, bc with some you might get alot of zeros like 0.000300000001 for example. but for now, that should do the trick.

    double barrange=Math.Abs(High[0]-Low[0]);
    if(Close[0]>=Open[0])
    DrawText("range"+CurrentBar, barrange.ToString(),0 , Low[0], Color.Black);
    if(Close[0]<Open[0])
    DrawText("range"+CurrentBar, barrange.ToString(),0 , High[0], Color.Black);

    Comment


      #3
      Originally posted by BigRo View Post
      something like that. u might have to round "barrange" up or down or convert it into a real number depending on what instrument your looking at, bc with some you might get alot of zeros like 0.000300000001 for example. but for now, that should do the trick.
      Yes I figured out the first part. Had to convert to String. How do I round it?

      Comment


        #4
        Nevermind figured that out as well. C# isn't really that different than Java.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X