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

Background

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

    Background

    Hi,

    please who can help me with this:..

    I have any chart (for example 5min timeframe) and there is 40 bars.
    And my indicator should change color of background the bars between 10:00 and 10:30.
    What method can change background color of any selected bar, or selected time.. ?

    Thank you

    Example is in the attachment
    Attached Files

    #2
    did not try this, but it should look something like the following:

    if (ToTime(Time[0]) >= 100000 && ToTime(Time[0]) <= 103000)

    {BackColor = Color.LightGreen;}

    Comment


      #3
      Thank you,
      that is exactly what i was looking for..

      and how could i set the default value: PANEL=1
      You know.. when you are adding any indicator to the chart you can set number of panel where will the the colors painted.

      Comment


        #4
        Hello,

        When you attach the indicator, just attach it to the panel you want to color.
        DenNinjaTrader Customer Service

        Comment


          #5
          sure, but i have to set panel 1 as default value for the indicator in code..
          when is somebody attaching the indicator there is panel=1 as default setting
          Is there any way how to do that?

          Comment


            #6
            Originally posted by zooinek View Post
            sure, but i have to set panel 1 as default value for the indicator in code..
            when is somebody attaching the indicator there is panel=1 as default setting
            Is there any way how to do that?
            For panel 1 under initialize ():
            Overlay = true;
            for the other panels:
            Overlay = false;

            Comment


              #7
              Yes, thats exactly what i was looking for..
              thank you

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              11 responses
              3,228 views
              0 likes
              Last Post xiinteractive  
              Started by andrewtrades, Today, 04:57 PM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              7 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              440 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              12 views
              0 likes
              Last Post FAQtrader  
              Working...
              X