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 NM_eFe, Today, 06:14 AM
              0 responses
              1 view
              0 likes
              Last Post NM_eFe
              by NM_eFe
               
              Started by sgordet, Today, 06:04 AM
              0 responses
              4 views
              0 likes
              Last Post sgordet
              by sgordet
               
              Started by bc24fl, 08-30-2019, 01:58 PM
              4 responses
              260 views
              0 likes
              Last Post PaulMohn  
              Started by sugalt, Today, 04:02 AM
              0 responses
              7 views
              0 likes
              Last Post sugalt
              by sugalt
               
              Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
              6 responses
              30 views
              0 likes
              Last Post tradingnasdaqprueba  
              Working...
              X