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 helpwanted, Today, 03:06 AM
              1 response
              12 views
              0 likes
              Last Post sarafuenonly123  
              Started by Brevo, Today, 01:45 AM
              0 responses
              9 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              5 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              387 views
              1 like
              Last Post Gavini
              by Gavini
               
              Working...
              X