• 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 hiikila, Today, 02:40 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by chafan11, 04-04-2020, 09:28 PM
      2 responses
      20 views
      0 likes
      Last Post bltdavid  
      Started by RumHam, 04-04-2020, 10:03 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by olivares_alfre, Yesterday, 02:19 PM
      2 responses
      13 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by Beauregard, Yesterday, 11:50 PM
      0 responses
      17 views
      0 likes
      Last Post Beauregard  
      Working...
      X