Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Keltner channel color

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

  • nikodine
    replied
    Originally posted by NinjaTrader_Paul View Post
    Hello nikodine,

    Thanks for your reply.

    The Rising() method require the input of a data series which would be Upper. When using Upper[0] you are providing a specific value of the current bar of the data series Upper.

    Try: if (Rising(Upper))

    Yes! That's it, thank you very much.

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello nikodine,

    Thanks for your reply.

    The Rising() method require the input of a data series which would be Upper. When using Upper[0] you are providing a specific value of the current bar of the data series Upper.

    Try: if (Rising(Upper))

    Leave a comment:


  • nikodine
    replied
    Originally posted by NinjaTrader_Paul View Post
    Hello nikodine,

    Thanks for your reply.

    In your example, you are using PlotColors[0][0] which would point to the Keltner midline, not the upper which would be PlotColors [1][0].

    Also, have you defined upColor and downColor? Something like this in Region variables:

    private Color upColor = Color.Green;
    private Color downColor = Color.Red;

    Hm.. yes?
    But why it doesn't allow the rising arg? Have a look:
    Attached Files

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello nikodine,

    Thanks for your reply.

    In your example, you are using PlotColors[0][0] which would point to the Keltner midline, not the upper which would be PlotColors [1][0].

    Also, have you defined upColor and downColor? Something like this in Region variables:

    private Color upColor = Color.Green;
    private Color downColor = Color.Red;

    Leave a comment:


  • nikodine
    replied
    Originally posted by NinjaTrader_Paul View Post
    Hello nikodine,

    My previous reply contained references to NinjaTrader8 help guide and methods. I have corrected my reply (post #4) to show the NinjaTrader7 references and methods. Sorry for any confusion.
    Thank you Paul, that's work very well.
    May I ask you one more thing, what I must add to make that if the price is trending up for example, the lines of the channel to be colored, and if the price is trending down to be in different color?
    I tried with rising method, but it seems I miss something.... here is what I tried to impl:

    if (Rising(Upper[0]))
    PlotColors[0][0] = upColor;
    else
    PlotColors[0][0] = downColor;

    Thanks again!

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello nikodine,

    My previous reply contained references to NinjaTrader8 help guide and methods. I have corrected my reply (post #4) to show the NinjaTrader7 references and methods. Sorry for any confusion.

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello nikodine,

    Thanks for your reply.

    To change the color of the Keltner plots when price is above the Upper or Lower plots you will need to use PlotColors and assign the color to use based on the logic you create. Here is a link to PlotColors in the Help guide which shows an example of coloring plots: https://ninjatrader.com/support/help...plotcolors.htm

    Note that PlotColors[][] uses two indexes, the first index is the plot number. The plot number starts at 0 and increments 1 for each plot and would be in the order as they are listed in the indicator. The KeltnerChannel has three plots in the order of Midline, Upper, lower, meaning the plot indexes will be [1] for the upper and [2] for the lower ([0] is the midline). The 2nd index is the bars ago which typically would be 0 (zero).

    An example of the logic (assuming you are working in a copy of KeltnerChannel) would be:

    if (Close[0] > Upper[0])
    {
    PlotColors[1][0] = Color.Red; // current bar price is above upper, color upper plot red.
    }

    edit: Original answer referenced NT8, changed to NT7.
    Last edited by NinjaTrader_PaulH; 09-25-2018, 07:04 AM.

    Leave a comment:


  • nikodine
    replied
    Originally posted by NinjaTrader_Paul View Post
    Hello nikodine,

    Thanks for your post.

    Is this something you want to create yourself and just need assistance to know what methods to use or are you looking to have someone create it for you?

    Just to be clear the NinjaTrader support team does not provide coding services. We can provide links to 3rd party providers that can provide the indicator coding service.or we can provide you with educational links to get you started and references to applicable help guide sections but you would need to do the actual coding, debugging and testing.
    I will make duplicate of current Keltner channel in NT7 and I need just to add the right syntax to make this happend. If you show me an example of the idea will be perfect.
    Thanks

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello nikodine,

    Thanks for your post.

    Is this something you want to create yourself and just need assistance to know what methods to use or are you looking to have someone create it for you?

    Just to be clear the NinjaTrader support team does not provide coding services. We can provide links to 3rd party providers that can provide the indicator coding service.or we can provide you with educational links to get you started and references to applicable help guide sections but you would need to do the actual coding, debugging and testing.

    Leave a comment:


  • nikodine
    started a topic Keltner channel color

    Keltner channel color

    Hi, may someone help me to make keltner channel to color the lines when the price is above the upper and below the bottom line?

Latest Posts

Collapse

Topics Statistics Last Post
Started by WHICKED, Today, 02:02 PM
1 response
3 views
0 likes
Last Post NinjaTrader_Erick  
Started by selu72, Today, 02:01 PM
0 responses
3 views
0 likes
Last Post selu72
by selu72
 
Started by f.saeidi, Today, 12:14 PM
8 responses
21 views
0 likes
Last Post f.saeidi  
Started by Mikey_, 03-23-2024, 05:59 PM
3 responses
49 views
0 likes
Last Post Sam2515
by Sam2515
 
Started by Russ Moreland, Today, 12:54 PM
1 response
7 views
0 likes
Last Post NinjaTrader_Erick  
Working...
X