• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How Do I Create a SMA Plot of Another Indicator?

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

    How Do I Create a SMA Plot of Another Indicator?

    Hi,
    I have created my own indicator (I call PN) which plots a line on any chart similar to a Simple Moving Average. This indicator works fine and plots exactly as it should. Now I want to show another indicator on my charts that is a SMA of my PN indicator.

    I have been trying to create this new indicator for about a week and haven't been able to figure out how to do this. Is this because the SMA will only work with Open, High, Low, Close and Volume data? I thought that I could use the data series from the PN indicator values to create the new SMA indicator plot. Is this not possible? I read that indicators could be used as inputs to other indicators but I must be misunderstanding something.

    If someone could help me with this or point me to where I find out more about this issue I would really appreciate your help. Thanks.
    LarryRay

    #2
    Originally posted by LarryRay View Post
    Hi,
    I have created my own indicator (I call PN) which plots a line on any chart similar to a Simple Moving Average. This indicator works fine and plots exactly as it should. Now I want to show another indicator on my charts that is a SMA of my PN indicator.

    I have been trying to create this new indicator for about a week and haven't been able to figure out how to do this. Is this because the SMA will only work with Open, High, Low, Close and Volume data? I thought that I could use the data series from the PN indicator values to create the new SMA indicator plot. Is this not possible? I read that indicators could be used as inputs to other indicators but I must be misunderstanding something.

    If someone could help me with this or point me to where I find out more about this issue I would really appreciate your help. Thanks.
    LarryRay
    Please see this video. Although its for NinjaTrader 7, the concept is the same in NinjaTrader 8.

    https://www.youtube.com/watch?v=zQRx...A14C398CA140D7
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks

      Ray,

      Thank you so much for pointing me to this video. I am using NinjaTrader 7 so it is exactly what I needed to know. From now on I will look through all of the training videos to see if they have already addressed my questions.

      LarryRay

      Comment


        #4
        Another Question

        Hi,

        I have one more question about this SMA that I created for my PN indicator. It looks good on my chart, but is there any way that I can use the values shown on this SMA line in a strategy that I am creating? If so, how do I refer to this value in a strategy?

        Thanks for your help.

        LarryRay

        Comment


          #5
          Hi LarryRay,

          Indicators are typically called with an index to access a value on a public series.

          For example:

          MyCustomIndicator(Parameter1, Parameter2)[0];

          or

          MyCustomIndicator()[0];

          or

          MyCustomIndicator().MyCustomPublicSeries[0];

          Depending on the public inputs and series created in the script.

          Below I am providing a link to a helpful forum post with information about getting started with NinjaScript.
          http://ninjatrader.com/support/forum...609#post503609
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by otislauwaert, Today, 02:02 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by rafleischman, 10-18-2018, 12:11 PM
          2 responses
          21 views
          0 likes
          Last Post Alfred
          by Alfred
           
          Started by dadarara, Yesterday, 02:42 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Dan_D_Trader, Today, 04:46 PM
          0 responses
          2 views
          0 likes
          Last Post Dan_D_Trader  
          Started by pstock805, Today, 08:25 AM
          3 responses
          15 views
          0 likes
          Last Post Trader17  
          Working...
          X