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 bortz, 11-06-2023, 08:04 AM
        47 responses
        1,607 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        15 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X