Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              597 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              343 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              556 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              555 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X