Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do i get a cell to change colour?

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

    How do i get a cell to change colour?

    Hi,

    As an example, how do i get the NetChange cell to change colour depending on whether it is above or below yesterday's value? I can see how to set the colour condition but it requeires a numerical value instead of either '<' or '>' indicator/O/H/L/C.

    Do i need to write a custom indicator for this?

    Cheers,

    .m.

    #2
    Hello,

    This is not supported in the Market Analyzer. However you can do this in the Strategy Wizard using a point a click method:
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks Ben.

      Comment


        #4
        How to change Cell Color

        This is how I do it:

        Just assign a numeric value to whatever color you want.

        EXAMPLE:

        if (CurrentBar == 0)
        return;
        Value.Set(0);

        if (Close[0] > Close[1])
        {Value.Set(1);}
        else
        if(Close[0] < Close[1])
        {Value.Set(2);}

        Include the if() ...Value.Set() code above in your indicator/script that has your condition. Also, do the Value.Set(0) as above.

        STEP 1:
        Right click in Market Analyzer, select indicator and load your indicator/script with the above line of Value.Set number assignment.

        Step 2:
        With the above indicator selected go to the right side of window, in the Special section select color conditions and click on the "..." gray button on the right.

        STEP 3:
        Click on the "Change Color if Value equals.." statement on left side of window and change both background and Foreground Color to White for the value of 0 on the left.

        Click on "New" button bottom of left side. Change both background and foreground color to "GREEN" (or your color of choice) and the color value to 1.

        Click on "New" button again bottom of left side. Change both background and foreground color to "RED" (or your color of choice) and the color value to 2.

        Hope you get the picture. You can add other numeric values in code and repeat this step to assign whatever color to these numeric values. Both foreground and background colors must be the same.

        That should do it.

        Cheers
        Delroy P. Anglin, MD

        Comment


          #5
          Hi Delroy,

          Many thanks for that..

          Now where did I put my 'C# For Dummies' book, looks like I have some reading to do!!

          Best regards,

          Matt..

          Comment


            #6
            That is an excellent post by dpanglin as it gives very clear instructions about how to create and use a custom indicator in Market Analyzer.

            Maybe this thread should be made a sticky.

            Chris

            Comment


              #7
              Thanks for the detailed post Delroy!
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by crewtrades, Yesterday, 10:50 AM
              3 responses
              21 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by Oracletrades, 02-21-2020, 01:37 PM
              14 responses
              2,053 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by kaywai, Today, 10:10 AM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by johnsb1990, Today, 09:34 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by psangram, Today, 09:30 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X