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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X