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 CarlTrading, 03-31-2026, 09:41 PM
              1 response
              155 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              90 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              137 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              130 views
              1 like
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              107 views
              0 likes
              Last Post CarlTrading  
              Working...
              X