Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

help with strategy

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

    help with strategy

    need some coding with my strategy using 1 and 5 minutes charts.
    if high of the current bar in 1 minute chart is the highest of the previous 5 bars, one of which's high is higher than the last downfractal in 5 minutes chart, go long. otherwise go short.


    thank for your help
    Last edited by peterhxu7; 10-04-2017, 09:28 PM.

    #2
    Hello peterhxu7,

    Thanks for your post.

    To access a 5 minute indicator from your 1 minute chart, you would need to add a 5 minute data series to your strategy using the Add() method, please see: https://ninjatrader.com/support/help...e.htm?add3.htm The helpguide provides an example of adding a 5 minute series.

    When adding data series to a strategy you are then creating a multi time frame strategy which will require an understanding of how bars are referenced, this is discussed in progressive detail here: https://ninjatrader.com/support/help...nstruments.htm Understanding this section will help you with your strategy.

    For the condition, "if high of the current bar in 1 minute chart is the highest of the previous 5 bars" you could use the MAX()method to check for the High series of the previous 5 bars, so the condition would look like: if (Highs[0][0] > MAX(Highs[0], 5)[1]) where Highs[0[0] refers to the current bar high of the 1 minute series, Highs[0] refers to the high data series of the 1 minute bars, 5 refers to 5 bars and [1] refers to the prior 5 bars (so that it does not include the current High otherwise the comparison would never be true).

    For the condition, "one of which's high is higher than the last downfractal in 5 minutes chart", I cannot advise as I do not know what or how you define a downfractal as.

    Comment


      #3
      hi paul:
      Thanks for your quick response. the fractal indicator was created by Dr bill william. There is downfractal and upfractal. The downfractal means resistant, the upfractal means support.

      Comment


        #4
        Hello peterhxu7,

        Thanks for your post.

        I took a quick look at the indicator bwFractals (available in the download section for NT7) and the indicator does not provide an output you can use in a strategy.

        Comment


          #5
          hi paul:
          I found some quote . would it help with the output of the fractal indicator?


          thanks

          p

          Comment


            #6
            Hello peterhxu7,

            Thanks for your reply.

            Just to be clear, in the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

            It looks like you would need to modify the indicator to provide a signal the strategy could use. If you would like to tackle that we can provide references to learning Ninjascript/C#.

            If you would like that modified/created for you, we can provide references to 3rd party ninjascript coders.

            Comment


              #7
              hi paul:
              I would like to know the the third party programmer if you have one. Thanks again for your help

              p

              Comment


                #8
                Hello peterhxu7,

                Thank you for contacting us and for your interest in NinjaTrader!

                You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!

                You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.


                This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.


                Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this thread at your convenience.
                Ryan L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                571 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                330 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                548 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                549 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X