Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to color candles based on RSI value?

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

  • BMinton
    replied
    Thanks for the response. I’ll try that out.

    Leave a comment:


  • Tagliareni
    replied
    If you're not familiar with coding, then use the Strategy Builder to suggest useful code. Use it to pick which functions whose code you want to see. For example, if you want to work with the code for when RSI is rising or over a certain value, then choose those functions in Strategy Building and choose View Code.


    Sample Code: Let's say if RSI is rising or greater than a certain value then color price bar green, and if vice versa then color it red.


    if (
    (IsRising(Rsi1) == true)
    ||
    (Rsi1[0] > 30))​​
    )
    {BarBrush = Brushes.Green;}


    if (
    (IsFalling(Rsi1) == true)
    ||
    (Rsi1[0] < 10))​​
    )
    {BarBrush = Brushes.Green;}


    I also suggest utilizing the {BackBrush = Brush1;} / ​{BackBrush = Brushes.Green;} functions to color the chart background. I strongly recommend learning how to adjust the opacity and the hex code to make custom colors. This is helpful to dim the chart background colors so they aren't overpowering. I use dim, dark color to draw BackBrush and bright colors to draw BarBrush. The effect is bright, colorful price bars against the background of dim dark colors corresponding to the output of my oscillators.

    Here's a picture of how I apply these ideas in my own system.


    Leave a comment:


  • BMinton
    replied
    Thank you for the response. I'll dive into your info this weekend.

    Leave a comment:


  • NinjaTrader_Gaby
    replied
    Hello BMinton,

    Thank you for your post.

    We do have resources to help you begin creating NinjaScript Strategies/Indicators. All links below are publicly available.

    If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of support articles first:
    Basic Programming Concepts

    For general C# education I have personally found Dot Net Perls to be a great reference site with easy to understand examples.


    We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
    Click here to see examples created by the support team
    Click here to see our NinjaScript Reference Samples
    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    Also, below I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript.


    Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.
    Alphabetical Reference

    And our Educational Resources in the NinjaTrader 8 help guide.
    Educational Resources

    I'm also providing a link to a support article with further helpful resources on getting started with C# and NinjaScript.




    Below is the Help Guide page for the RSI, which includes syntax for how to access the RSI values in your code.



    You can use BarBrushes to change the color of a bar.



    Please let us know if you have any further questions.

    Leave a comment:


  • BMinton
    started a topic How to color candles based on RSI value?

    How to color candles based on RSI value?

    I use a RSI candle indicator in Trading View that colors the candles based on the RSI value. I have it set to one color if the RSI in over 50 and another color if it's less than 50.
    While I have coded a little bit in Pinescript for TradingView, I'm new to indicator development for Ninjatrader and I don't know how to go about making that indicator here.

    Does someone have any advice on how to code this in NinjaTrader?

Latest Posts

Collapse

Topics Statistics Last Post
Started by RichardHK, 08-22-2024, 09:02 AM
4 responses
59 views
0 likes
Last Post RichardHK  
Started by HGTrader, Today, 09:31 AM
1 response
3 views
0 likes
Last Post NinjaTrader_Gaby  
Started by Gibranes, 10-12-2024, 04:02 AM
3 responses
15 views
0 likes
Last Post NinjaTrader_Jesse  
Started by dbennett3, Today, 09:18 AM
1 response
6 views
0 likes
Last Post NinjaTrader_Clayton  
Started by cupir2, Yesterday, 05:27 PM
1 response
14 views
0 likes
Last Post NinjaTrader_Jesse  
Working...
X