Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Triangles Plotting inconsistent

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

    Triangles Plotting inconsistent

    I am on NT 6.5, trying to have Triangles plotted above/below the candles when RSI value is below 30 or above 70.

    As shown in the pic, the BarColor works consistently, but the Triangles are missing MOST of the time. There are no errors in the Log tab.

    BTW, I do not wish to use BarColor for this. It is only to see that the code is working fine.

    Please help.

    Code:
       double value = RSI(Close, Period, Smooth)[0];
       // Use an if branch to set triangles 
       if (value > 70) 
        { 
           DrawTriangleUp("tag1", true, 0, Low[0] - TickSize, UpTriangle); 
        BarColor = UpTriangle;
        CandleOutlineColor = Color.Black;
        } 
       else if (value < 30) 
        { 
           DrawTriangleDown("tag2", true, 0, High[0] + TickSize, DownTriangle);
        BarColor = DownTriangle;
        CandleOutlineColor = Color.Black;
        }
    Attached Files
    Last edited by ekshay; 08-17-2010, 08:44 AM.

    #2
    ekshay, you will need to use a unique tag id for each triangle should you wish to see the historical placement of those according to your conditions -

    Comment


      #3
      Thanks Bertrand.
      Got it working now.

      It needed the "+ CurrentBar" thing.
      Attached Files
      Last edited by ekshay; 08-17-2010, 08:42 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      42 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      157 views
      2 likes
      Last Post CaptainJack  
      Working...
      X