Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 -

    BertrandNinjaTrader Customer Service

    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 puapwr, Today, 06:09 PM
      0 responses
      1 view
      0 likes
      Last Post puapwr
      by puapwr
       
      Started by franciscog21, Today, 05:27 PM
      0 responses
      4 views
      0 likes
      Last Post franciscog21  
      Started by hdge4u, 04-29-2024, 12:23 PM
      5 responses
      28 views
      0 likes
      Last Post MisterTee  
      Started by llanqui, 01-25-2024, 06:15 PM
      9 responses
      64 views
      0 likes
      Last Post MisterTee  
      Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
      16 responses
      66 views
      0 likes
      Last Post tradingnasdaqprueba  
      Working...
      X