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

check historic data for a pattern

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

    check historic data for a pattern

    Hi
    I want to check if a pattern (takes 10 days to complete) has occurred in the last 20 days.
    I want to be flexible enough so that I don’t have to input the exact days: “please check if between day 17 and day 7” within the last 20 days this occurred. So in this example the only parameter I’d like to have is 20 days and want NT to check if there was an occurrence of 10 day pattern anywhere in the last 20 days.
    Secondly, once the pattern occurred I want to then check if during those specific 10 days of pattern occurrence the RSI indicator is trending up.
    Please advise if this is possible and which methods should I employ.
    Thank you

    #2
    Hello,

    Yes this is possible and would involve creating different variables to store the results of different checks you would need to perform.

    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
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi

      Thanks for your message. I appreciate the links you posted, but to be honest I found your reply very vague. I am not new to the NT and a lot of the links you've submitted refer to very broad topics/general help.

      As you can see I tried to be specific as much as it is possible with my request, so I expect at least to be referred to the NT methods or logic or understand the process I need to complete so that I can get on the right track from the beginning.
      I have received numerous replies with precise references all of which make this forum a great place to be. But this time I have to tell you that your reply is of no real help to me. In other words I know this is already available somewhere, but I don't know where, so I come here to ask you, NT experts for some targeted guidance.

      If I can be of any help with rephrasing my query, if it is not clear, then please let me know and I'll reword it.

      Thank you

      ionaz

      Comment


        #4
        Sorry - your inquiry was not very specific as you may have imagined. I would have assumed that you were new to NinjaTrader programming and would have linked you to our Help Guide as well as there are several ways to attack it.

        If you can please specify why you're running into problems, or what methods you have already tired, we'd be happy to help with your specific problem. At this point, the only other advise I'd have for you is to contact a NinaScript consultant who you can pay to program your strategy.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by ionaz View Post
          Hi

          Thanks for your message. I appreciate the links you posted, but to be honest I found your reply very vague. I am not new to the NT and a lot of the links you've submitted refer to very broad topics/general help.

          As you can see I tried to be specific as much as it is possible with my request, so I expect at least to be referred to the NT methods or logic or understand the process I need to complete so that I can get on the right track from the beginning.
          I have received numerous replies with precise references all of which make this forum a great place to be. But this time I have to tell you that your reply is of no real help to me. In other words I know this is already available somewhere, but I don't know where, so I come here to ask you, NT experts for some targeted guidance.

          If I can be of any help with rephrasing my query, if it is not clear, then please let me know and I'll reword it.

          Thank you

          ionaz
          Your enquiry itself was somewhat generalized. However, here is what you need to do, also in general skeleton terms.
          1. Define the mathematical relationships of your pattern, from the first bar to the last.
          2. Record the bar on which the pattern completes.
          3. Check if that completion bar is less than 10 bars ago. (Pattern takes 10 bars, so for it to occur within the last 20 bars, it must have completed a maximum of 10 bars ago, unless of course, you are measuring 20 bars from the end of the pattern, rather than 20 bars from the start).

          Comment


            #6
            Thanks Koganam

            This is what I needed at this stage – general guidance/algo I need to follow to implement such idea. I am at the beginning of my journey with a new strategy, so no real code/problem to share.
            I thought I was specific enough J, sorry if I wasn’t. I’ll come back with more specific queries once I kick it off and if need help.

            Thanks Lance, Thanks Matthew.

            Ionaz

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by geddyisodin, Today, 05:20 AM
            3 responses
            20 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by lorem, Today, 09:18 AM
            1 response
            5 views
            0 likes
            Last Post lorem
            by lorem
             
            Started by bmartz, Today, 09:30 AM
            0 responses
            5 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by GussJ, 03-04-2020, 03:11 PM
            14 responses
            3,245 views
            0 likes
            Last Post GussJ
            by GussJ
             
            Started by ArkansasClint, Today, 09:28 AM
            0 responses
            2 views
            0 likes
            Last Post ArkansasClint  
            Working...
            X