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 ghoul, Today, 06:02 PM
      0 responses
      3 views
      0 likes
      Last Post ghoul
      by ghoul
       
      Started by Barry Milan, Yesterday, 10:35 PM
      6 responses
      18 views
      0 likes
      Last Post Barry Milan  
      Started by DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      13 views
      0 likes
      Last Post DanielSanMartin  
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      13 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      12 views
      0 likes
      Last Post terofs
      by terofs
       
      Working...
      X