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 futtrader, 04-21-2024, 01:50 AM
      4 responses
      41 views
      0 likes
      Last Post futtrader  
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      12 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      8 views
      0 likes
      Last Post port119
      by port119
       
      Started by Philippe56140, Today, 02:35 PM
      0 responses
      7 views
      0 likes
      Last Post Philippe56140  
      Started by 00nevest, Today, 02:27 PM
      0 responses
      8 views
      0 likes
      Last Post 00nevest  
      Working...
      X