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

Plotting With AxisColor Lines

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

    Plotting With AxisColor Lines

    Hi NT,

    Is there a way to plot with AxisColor? I can draw with AxisColor but have not found a way to Plot with it.

    Thanks,

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    Hello,

    What specifically do you mean by plot with it? Are you trying to set a plot color in initialize or want it to be user selectable in the properties menu for the indicator/strategy?

    What error are you getting?

    -Brett

    Comment


      #3
      Hi Brett,

      If I want to make an EMA use AxisColor when it plots on a chart?

      How can I do that?

      Any NT acceptable method is OK with me.

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        Hello,

        This would be unsupported however this seems to work:

        Add(new Plot(ChartControl.AxisColor, PlotStyle.Line, "Plot0"));

        Would need to test it and also make sure to check that ChartControl is not null before you access it.

        -Brett

        Comment


          #5
          Originally posted by NinjaTrader_Brett View Post
          Hello,

          This would be unsupported however this seems to work:

          Add(new Plot(ChartControl.AxisColor, PlotStyle.Line, "Plot0"));

          Would need to test it and also make sure to check that ChartControl is not null before you access it.

          -Brett
          Hi Brett,

          When selecting the indicator with specified changes to add to a chart, I'm getting the following error in the output window.

          Failed to call method 'Initialize' for indicator 'RJayBarPriceXRay3': Object reference not set to an instance of an object.

          Any Suggestions?

          RJay
          RJay
          NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

          Comment


            #6
            Hello,

            Did you put in the null check for chart control or the property before you access it?

            You may need to move it out of initalize and set it with a BarColor in OnBarUpdate.

            -Brett

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            5 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Yesterday, 08:42 PM
            0 responses
            11 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Yesterday, 07:51 PM
            0 responses
            13 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,982 views
            3 likes
            Last Post jhudas88  
            Working...
            X