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 yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        21 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        5 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X