Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I create a custom indicator?

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

    How do I create a custom indicator?

    For example: I am charting SPY on a daily chart. I want to deflate each value by 163.17 (the close on Jan 2nd, 2012) since that was the date that I bought it (my base date). This will give me SPY in percentage terms relative to the base date.

    How do I do this?

    Thanks!

    #2
    Hello achalk,

    Thank you for your post.

    This would be possible, do you plan on creating new bars for the SPY instrument based on your calculation? Or an indicator that used the last price (Close[0]) minus 163.17?

    Your methods of plotting will vary depending if you plan on creating new bars on your chart or just a simple plot.

    We have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

    A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

    We also have some Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples
    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there.

    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
    Click here for a list of certified NinjaScript Consultants

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thanks for your reply.

      I want to plot Close[0]/163.17

      Does that require a C# NinjaScript?

      Thanks.

      Comment


        #4
        Hello achalk,

        Thank you for your response.

        Yes, that calculation and plot would require programming in NinjaScript.

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        85 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        67 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X