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 LiamTwine, Today, 08:10 AM
              0 responses
              1 view
              0 likes
              Last Post LiamTwine  
              Started by Balage0922, Today, 07:38 AM
              0 responses
              5 views
              0 likes
              Last Post Balage0922  
              Started by JoMoon2024, Today, 06:56 AM
              0 responses
              6 views
              0 likes
              Last Post JoMoon2024  
              Started by Haiasi, 04-25-2024, 06:53 PM
              2 responses
              19 views
              0 likes
              Last Post Massinisa  
              Started by Creamers, Today, 05:32 AM
              0 responses
              6 views
              0 likes
              Last Post Creamers  
              Working...
              X