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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        384 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        250 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        210 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        298 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        260 views
        0 likes
        Last Post CarlTrading  
        Working...
        X