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 DannyP96, 05-18-2026, 02:38 PM
        1 response
        29 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        117 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        227 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        309 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X