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 funk10101, Today, 12:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nandhumca, Yesterday, 03:41 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Working...
        X