• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I change the color of plot in realtime?

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

    How can I change the color of plot in realtime?

    Hello,

    I am using Add(Plot) to draw r/s lines in realtime (every 5 minute) as I discussed in http://www.ninjatrader-support.com/v...ead.php?t=7161. Depends on the market condition, it is either all plots are resistance lines or support lines. To save some resource, I decide to let those resistance lines share the same plots with support lines. My question is whether it is possible to change the color of a plot in realtime, for example, when a plot is used to display resistance, it is drawn in Red, otherwise it is drawn in Green. Is it possible?


    - Clearpicks

    #2
    Try something like:

    Code:
    if (Support)
        Plots[0].Pen.Color = Color.Green;
    else
        Plots[0].Pen.Color = Color.Red;
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks a million

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Gav_G, Today, 02:12 PM
      0 responses
      1 view
      0 likes
      Last Post Gav_G
      by Gav_G
       
      Started by Gav_G, Today, 01:41 PM
      0 responses
      4 views
      0 likes
      Last Post Gav_G
      by Gav_G
       
      Started by kweiss, Today, 01:21 PM
      0 responses
      3 views
      0 likes
      Last Post kweiss
      by kweiss
       
      Started by digibob, Yesterday, 06:45 AM
      2 responses
      14 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by cutzpr, Today, 08:44 AM
      0 responses
      2 views
      0 likes
      Last Post cutzpr
      by cutzpr
       
      Working...
      X