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

Get color of background on a specific bar

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

    Get color of background on a specific bar

    Hello guys,

    I have an indicator that changes the background color on a specific bar in specific conditions. Which code could help me to get the color code of that specific background color when the indicator changes it? I'm testing with BackBrushes[0] but no luck so far.

    Thank you.

    #2
    Hello facuevasm,

    If the indicator is coloring bars and you are trying to access those colors from outside of the indicator there is not a way to do that. BarBrushes is only available to the script that sets it. The indicator would need to instead expose a signal in the form of a Plot.

    I the indicator in question something which you have the code for or is this a third party item? If you have the code for it you can add a plot and then expose a signal by plotting in the areas of the code which currently are setting the BackBrush.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. my mistake, what I need is the background color. I'm using BackBrushes[0].

      I will be alert!

      Kind regards,

      Felipe

      Comment


        #4
        Hello facuevasm,

        The background color is not something which a script can read. If your indicator sets a background color another indicator cannot read that. The indicator which sets the background needs to expose the data as a plot for it to be used as a signal.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X