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 Karado58, 11-26-2012, 02:57 PM
            8 responses
            14,828 views
            0 likes
            Last Post Option Whisperer  
            Started by Option Whisperer, Today, 09:05 AM
            0 responses
            1 view
            0 likes
            Last Post Option Whisperer  
            Started by cre8able, Yesterday, 01:16 PM
            3 responses
            11 views
            0 likes
            Last Post cre8able  
            Started by Harry, 05-02-2018, 01:54 PM
            10 responses
            3,204 views
            0 likes
            Last Post tharton3  
            Started by ChartTourist, Today, 08:22 AM
            0 responses
            6 views
            0 likes
            Last Post ChartTourist  
            Working...
            X