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 Jonker, Today, 01:19 PM
      0 responses
      1 view
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      5 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,791 views
      0 likes
      Last Post aligator  
      Started by Jimmyk, 01-26-2018, 05:19 AM
      6 responses
      844 views
      0 likes
      Last Post emuns
      by emuns
       
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      6 responses
      3,296 views
      1 like
      Last Post jgualdronc  
      Working...
      X