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 frankthearm, Today, 09:08 AM
              3 responses
              7 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by yertle, Today, 08:38 AM
              5 responses
              15 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by adeelshahzad, Today, 03:54 AM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by bill2023, Yesterday, 08:51 AM
              6 responses
              27 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
              80 responses
              19,667 views
              5 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X