Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change colors of PriceLevels in drawing tool

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

    Change colors of PriceLevels in drawing tool

    Hi,

    I'm experimenting with the drawing tools. (Andrews pitchfork to be precise)

    In the case State.Configure: there are 3 levels Pricelevels created:

    PriceLevels.Add(new PriceLevel(0, Brushes.Blue));
    PriceLevels.Add(new PriceLevel(50, Brushes.Blue));
    PriceLevels.Add(new PriceLevel(100, Brushes.Blue));
    Once these are created how can I change the color?
    I presume I need to change this code to make the levels global like this:

    #in variables:
    PriceLevels level1, level2, level3;

    case State.Configure:
    level1 = PriceLevels.Add(new PriceLevel(0, Brushes.Blue));
    level2 = PriceLevels.Add(new PriceLevel(50, Brushes.Blue));
    level3= PriceLevels.Add(new PriceLevel(100, Brushes.Blue));
    Down in the code I would like to do something like this:

    level1.color = red;

    Is that possible ? or how would I do that now in NT8?

    Many thanks in advance

    Wessel
    Last edited by Wessel; 11-07-2015, 02:55 PM.

    #2
    Hello Wessel,

    Thank you for writing in.

    The simplest way would be to do the following:
    Code:
    PriceLevels[0].Stroke = new Stroke(Brushes.Red);
    PriceLevels[1].Stroke = new Stroke(Brushes.Green);
    PriceLevels[2].Stroke = new Stroke(Brushes.Yellow);
    Please let me know if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Excellent!

      That works great!

      Wessel

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      664 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      376 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X