Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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?



    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, 10: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 GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,281 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        53 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X