Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Quick Question - Color Disappears on Reload

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

    Quick Question - Color Disappears on Reload

    My range bar close marker draws two lines at the projected closes of the current range bar. I have these colored using:

    private Color markercolor = Color.Blue;

    DrawLine("upper",false,-1,upper,1,upper,markercolor,DashStyle.Solid,thickness)

    This works fine when I add it to a chart initially. But say I close NT down, and then open it up again, the color is now gone. I click into indicators from the chart, and the place to choose the color is just blank.

    Any ideas? I'm sure there is a simple something I'm forgetting...

    Thanks -

    #2
    You're using colors as inputs?

    You need to serialize them perhaps?

    http://www.ninjatrader.com/support/f...ead.php?t=4977

    That's the only thing I can think of at the moment.


    Originally posted by jmflukeiii View Post
    My range bar close marker draws two lines at the projected closes of the current range bar. I have these colored using:

    private Color markercolor = Color.Blue;

    DrawLine("upper",false,-1,upper,1,upper,markercolor,DashStyle.Solid,thickness)

    This works fine when I add it to a chart initially. But say I close NT down, and then open it up again, the color is now gone. I click into indicators from the chart, and the place to choose the color is just blank.

    Any ideas? I'm sure there is a simple something I'm forgetting...

    Thanks -

    Comment


      #3
      Excellent thank you. All fixed up -

      You do seem surprised that I did it this way. Is there a better way to have done it? I though about plots set to hash, but I only care about the current bar, and don't want the plots to plot in the past.
      Last edited by jmflukeiii; 04-04-2013, 09:22 PM.

      Comment


        #4
        jmflukeiii, same you would have to do for a custom color used as input for a plot. You could call .Reset on those to then only set a value on for specific bars, but I think your approach is just fine.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Rubens_2020, Today, 01:48 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by kempotrader, Today, 01:34 PM
        1 response
        23 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by bc24fl, Today, 01:50 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by vantojo, Today, 01:39 PM
        0 responses
        14 views
        0 likes
        Last Post vantojo
        by vantojo
         
        Started by bosajin, 01-21-2021, 09:15 AM
        7 responses
        58 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Working...
        X