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

Incorrect Plot color / price marker color

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

    Incorrect Plot color / price marker color

    Hi, I add about 100 plots in
    Code:
    Initialize
    For some reason, when I run the indicator on historical data (scroll chart to the leftmost, add indicator and begin to slowly scroll to the right), the plot colors are always gray, even though they are set to various colors and none of them is gray.

    However, once I have scrolled to the latest historical bar, or go realtime then the plot colors become correct.

    Could you please clarify?

    #2
    Hello alex.nt,

    Thank you for your post.

    Do you see any errors listed in the Log tab of the NinjaTrader Control Center when applying this indicator to a chart?

    Are any values set exclusively Historical?

    Can you provide the .Set sections of your code where the values are set for the indicator?

    I look forward to your response.

    Comment


      #3
      Hi, thanks for the info

      1) There are no errors in Log/traces.
      2) What do you mean by .Set sections?
      3) What do you mean by "Are any values set exclusively Historical?"

      Comment


        #4
        Hello alex.nt,

        Thank you for your response.

        Do you use a condition such as if(Historical) in your code?

        Do you set values for your Plots? If so please provide the code used to set the values.

        I look forward to your response.

        Comment


          #5
          a) I do not use Historical
          b) I set the values like this:
          Code:
          if (CurrentBar != 0)
          {
          	Values[plotIndex].Reset(1);
          }
          Plots[plotIndex].Pen.Color = Color.Red;
          Values[plotIndex].Set(price);

          Comment


            #6
            Hello alex.nt,

            Thank you for your response.

            What color are the Plots set to in the Intialize() method?

            I look forward to your response.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by AaronKoRn, Today, 09:49 PM
            0 responses
            6 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Today, 08:42 PM
            0 responses
            9 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Today, 07:51 PM
            0 responses
            10 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,976 views
            3 likes
            Last Post jhudas88  
            Started by rbeckmann05, Today, 06:48 PM
            0 responses
            9 views
            0 likes
            Last Post rbeckmann05  
            Working...
            X