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;
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        46 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by arvidvanstaey, Today, 02:19 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by mmckinnm, Today, 01:34 PM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by f.saeidi, Today, 01:32 PM
        2 responses
        9 views
        0 likes
        Last Post f.saeidi  
        Working...
        X