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

  • NinjaTrader_Bertrand
    replied
    Thanks for the detailed post Delroy!

    Leave a comment:


  • Operandi
    replied
    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

    Leave a comment:


  • newbouldm
    replied
    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..

    Leave a comment:


  • dpanglin
    replied
    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

    Leave a comment:


  • newbouldm
    replied
    Thanks Ben.

    Leave a comment:


  • NinjaTrader_Ben
    replied
    Hello,

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

    Leave a comment:


  • newbouldm
    started a topic How do i get a cell to change colour?

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by kiss987, 05-16-2018, 02:19 AM
13 responses
2,847 views
0 likes
Last Post NinjaTrader_Jesse  
Started by icebergdelphi, 06-12-2024, 04:01 PM
5 responses
32 views
0 likes
Last Post NinjaTrader_Gaby  
Started by merzo, Today, 08:48 AM
1 response
7 views
0 likes
Last Post NinjaTrader_Clayton  
Started by elon888musk, Yesterday, 02:22 PM
2 responses
14 views
0 likes
Last Post elon888musk  
Started by dinest93, Today, 03:01 AM
1 response
11 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X