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

Help with Simple indicator pls

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

    Help with Simple indicator pls

    Hi,

    Iam so stupid on programming even the easy indicator in NT7. Can someone help me pls?

    Value of indicator is:

    (Moving average of Close-Open of last X bars) divided by (ATR of last X bars). And output is between 0-100%.

    Really simple, but I lost more than a week to try to programme it, but it still cant work.

    Can anyone help? I would be so thankful.¨

    Kamil

    #2
    Hello,

    Sure I can help point you in right direction,

    Can you plase clrify what time frame chart this is running on also,

    When you say Open of last X bars and ATR of last X bars, does this mean you want this to be a parameter or is there a hard number for x you can put in here?

    I look forward to assisting you further.

    Comment


      #3
      Thank you very much.

      X is the number I could enter to indicator - Period of this indicator.

      Anyway I ll use only X = 1, 2, or 3.

      Time frame is Daily chart.

      Once more thank you for your respond.

      Comment


        #4
        so X is parameter :-)

        Comment


          #5
          Lastly I had another question before I assist.

          (Moving average of Close-Open of last X bars)

          Does this mean the (SMA(Close) - Open[0] + Open[1] + Open[3]) etc. etc.

          Is this correct?

          I look forward to assisting you further.

          Comment


            #6
            No, its SMA(Close[0] - Open[0]) for X=1 and SMA((close[0]-open[0], close[1]-open[1],...till close[x]-open[x]) for X= 1,2,3, etc

            Comment


              #7
              Hello,

              Heres a tip to get you headed the right direction.

              You will need to create your own data series.

              The data series you need is the Close[0] - Open[0].

              To do this follow this guide and create a data series that is equal to DataSeriesName.Set(Close[0] - Open[0]);



              Then use SMA(DataSeriesName, X)[0] // X Being the period of the SMA you want.


              So it would like like this SMA(DataSeriesName, Period)[0] / ATR(Period)[0]


              Let me know if I can be of further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by AveryFlynn, Today, 04:57 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by Max238, Today, 01:28 AM
              4 responses
              37 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by r68cervera, Today, 05:29 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by geddyisodin, Today, 05:20 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by timko, Today, 06:45 AM
              2 responses
              14 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Working...
              X