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 GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,229 views
            0 likes
            Last Post xiinteractive  
            Started by andrewtrades, Today, 04:57 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            7 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            441 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            12 views
            0 likes
            Last Post FAQtrader  
            Working...
            X