Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to use Draw.Triangle Below and above bar not working

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

    Trying to use Draw.Triangle Below and above bar not working

    Hello,
    Im trying to use Draw.TriangleUp Below EVERY bar and
    Im trying to use Draw.TriangleDown Above EVERY bar,

    when i use one snippet: Draw.TriangleDown(this, "MyTriDown"+CurrentBar.ToString(), true, 0, High[0] + (TickSize * 125), Brushes.Red);
    It plots every bar; however, when i add in the other object:
    Draw.TriangleUp(this, "MyTriUp"+CurrentBar.ToString(), true, 0, Low[0] - (TickSize * 25), Brushes.Red);
    BLAH... PLZ HELP and Thank you in advance
    Sincerely,
    Mikeyboy

    #2
    Hello, thanks for writing in. This does not look like a complete snippet of code. I am not seeing any conditions separating the triangle colors from up bars and down bars. Do you have these in your script?

    Comment


      #3
      I just want to plot both triangles on top and bottom of every bar, is this possible, so the bar is surrounded by triangles
      Draw.TriangleUp(this, "MyTriUp"+CurrentBar.ToString(), true, 0, Low[0] - (TickSize * 25), Brushes.Red);
      Draw.TriangleDown(this, "MyTriDown"+CurrentBar.ToString(), true, 0, High[0] + (TickSize * 25
      this is my only code in onbarupdate()
      Thanks again ​

      Comment


        #4
        Hello, thanks for the follow up. What is the specific error you are getting or non-expected behavior? It looks like these should work.

        Comment


          #5
          right?
          When i use both lines of code i only get one print on one bar for one. when i use b
          one line up or down u get a triangle every bar but for some reason wrong let me do two every bar even with magical Tag number.
          i would love to know why so i can understand the language better rather than functionality in this specific case

          thanks

          Comment


            #6
            Hi, thanks for the follow up. I am able to do it with this code in OnBarUpdate. Can you please try this?
            Code:
                    protected override void OnBarUpdate()
                    {
                        Draw.ArrowDown(this, "down"+CurrentBar, false, 0, High[0]+TickSize*4, Brushes.Red);
                        Draw.ArrowUp(this, "up"+CurrentBar, false, 0, Low[0]-TickSize*4, Brushes.Lime);
                    }​

            Comment


              #7
              Wow bro this is bizzare, it totally works, I changed it to
              Draw.Text(this, "down"+CurrentBar, "H", 0, High[0]+TickSize*4, Brushes.Red);
              Draw.Text(this, "up"+CurrentBar, "L", 0, Low[0]-TickSize*4, Brushes.Lime);​
              And this works too, very interesting, i might have missed a field or had some other stuff in script,
              Anyways glad to see we can basically infinitley plot labels,that was a big reason for me switching to ninja from trading view, you can only draw 500 lines and 500 boxes in pinescript
              Slap on a bars back filter to clear up that lag and the possibilities are endles
              Cheers!,
              Michael

              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