Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

filter chart by price above a keltner line

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

    filter chart by price above a keltner line

    is there way to have a filter on a chart for instance only when candles are below a keltner line? and, just see those candles.

    #2
    Hello SteveReiza,

    Thanks for your notes.

    There are no filter options for a chart that would filter and show only candles that are below a Keltner Channel indicator line.

    Something you could consider is creating your own custom NinjaScript indicator that checks if the price of a bar is less than a Keltner Channel indicator plot and setting the BarBrush to a specific color so those bars on the chart would change to that set color.

    KeltnerChannel(): https://ninjatrader.com/support/help...er_channel.htm
    BarBrush: https://ninjatrader.com/support/help...8/barbrush.htm

    Please let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. i'm using the strategy builder. and, i'm attempting to use bar brush. is the only thing i have to do is put a 'do the following' as draw > bar color? or, do i have to make a string or a bool? on the help guide, it has text stating the color and then something about it being null.

      Comment


        #4
        Hello SteveReiza,

        Thanks for your notes.

        You do not have to set BarBrush = null in your script.

        In the 'Do the following' section of your Set you would simply need to set the BarBrush (Drawing folder > Set bar color) to the color you want the bars to change to.

        The color of the bar would change to that color you set when the conditions in that Set become true.

        Please let us know if we may further assist you on this topic.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. okay sweet. i have the conditions the same in another set. and, i'm getting the executions from them. but for some reason they aren't executing the paint bar. they are the last set. does it matter what sequence its in?

          Comment


            #6
            Hello SteveReiza,

            Thanks for your notes.

            Strategy Builder Sets are processed in the order that they are created. So for example, Set 1 would process, then Set 2, then Set 3, and so on.

            I suggest setting the BarBrush (Drawing folder > Set bar color) in the same Set that you create conditions for changing the bar color.

            For example, if the conditions to change the BarBrush are in Set 3, you should create an action to set BarBrush in Set 3, not another Set.

            You should also add debugging prints to the strategy to understand exactly how the strategy logic is behaving when the script is not working as expected. This will allow you to see exactly how the conditions in your script are behaving and if certain actions are triggered.

            Add prints to the strategy (outside the conditions) that print out all the conditions used to set the BarBrush to a specific color. Also, add a print below where you are setting BarBrush that prints out something like "BarBrush triggered" to confirm the conditions are true and the actions in the Set should fire.

            Prints will appear in a New > NinjaScript Output window.

            Below is a link to a forum post that demonstrates how to use prints to understand behavior.

            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. alrighty. i'll see what's going on with using prints. its not brushing for some reason.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by pibrew, Today, 06:37 AM
              0 responses
              0 views
              0 likes
              Last Post pibrew
              by pibrew
               
              Started by rbeckmann05, Yesterday, 06:48 PM
              1 response
              12 views
              0 likes
              Last Post bltdavid  
              Started by llanqui, Today, 03:53 AM
              0 responses
              6 views
              0 likes
              Last Post llanqui
              by llanqui
               
              Started by burtoninlondon, Today, 12:38 AM
              0 responses
              10 views
              0 likes
              Last Post burtoninlondon  
              Started by AaronKoRn, Yesterday, 09:49 PM
              0 responses
              15 views
              0 likes
              Last Post AaronKoRn  
              Working...
              X