Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Find all candles that closed at least 90% on top

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

    Find all candles that closed at least 90% on top

    I would like Ninjatrader to find candles that closed 90% from it top ( so very little or no shadows/ wicks) if that is true color it blue

    please advise how to do this.

    #2
    Hi wallsteetking,

    This is possible with custom programming in NinjaScript. Do you have the calculation or are looking for help building it? This one could be used to compare High to Close and color if smaller than 10% change.

    if ((High[0] - Close[0]) / High[0] <= .1)
    BarColor = Color.Blue;
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hey Ryan i been trying to make this code work however, when i run the stratgy it highlights all of the bars.. could there be something wrong with the code.

      Comment


        #4
        Would you see the same outcome with this changed snippet below?

        double perc = (High[0] - Close[0]) / High[0];

        if (perc >= 0.001)
        BarColor = Color.Blue;

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        64 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        22 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        25 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        52 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X