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

Trend discovery via indicator or script

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

    Trend discovery via indicator or script


    Hey Team,

    I am a super rookie when it comes to making basic strategies and use the builder for the most part and i could use your help with something, I want to determine if there is currently an uptrend or a downtrend in the market for a scalping strategy i am working on, Does anyone know of a way where i can count the last X bars on a chart (probably the 2000T chart say 50-100 bars) and have a condition for an upwards trend or a downwards trend to continue, or even better an indicator that can provide a up/down flag that i can use the builder with? Sorry for the rookie question im very new but i love the idea behind strategy building, thanks again!


    #2
    Hello RookieKiwi,

    Thanks for your post and welcome to the NinjaTrader forums!

    In terms of the Strategy Builder, you might look at Misc>Slope where you can specify the number of bars to use in determining the slope of price or perhaps of a moving average. A positive value of slope would indicate an uptrend and a negative value for the downtrend.

    For other ideas, you might look at the public free indicators available in the NT user apps section of the Ninjatrader Ecosystem https://ninjatraderecosystem.com/use...r-8-indicators Please note: The 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 add-ons 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.

    We can leave this thread open for any forum member to contribute.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello RookieKiwi,

      Thanks for your post and welcome to the NinjaTrader forums!

      In terms of the Strategy Builder, you might look at Misc>Slope where you can specify the number of bars to use in determining the slope of price or perhaps of a moving average. A positive value of slope would indicate an uptrend and a negative value for the downtrend.

      For other ideas, you might look at the public free indicators available in the NT user apps section of the Ninjatrader Ecosystem https://ninjatraderecosystem.com/use...r-8-indicators Please note: The 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 add-ons 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.

      We can leave this thread open for any forum member to contribute.
      So would that mean i could use misc/slope of 0-50 (last 50 bars) is >= misc/numeric 0 would be an uptrend ?? just want to confirm this

      Comment


        #4
        Are there any third party apps built that do this already? I was looking, but most of the descriptions are a bit short/obscure/crypic in some ways.
        thanks

        Comment


          #5
          Hello RookieKiwi,

          Thanks for your reply.

          It would simply mean that over the 50 bars the slope is positive.

          Although = 0 would be flat so you may want to stick with greater than zero.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hello NTPlayer,

            Thanks for your post and welcome to the Ninjatrader forums.

            One form of trend detection is a fast moving average crossing over a slower moving average

            Both you and RookieKiwi may want to look at this indicator which is based on Moving average crosses and provide a signal (plot) when the crossover occurs of two selected moving averages. The indicator can be used with the strategy builder and provides a +1 signal when the fast crosses above the slow or a -1 when the fast crosses below the slow.

            This indicator is publicly available on our NinjaTrader Ecosystem website:Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

            Note — To import NinjaScripts you will need the original .zip file.

            To Import:
            1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
            2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
            3. Select the downloaded .zip file
            4. NinjaTrader will then confirm if the import has been successful.

            Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

            Once installed, you may add the indicator to a chart by:
            • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

            Here is a short video demonstration of the import process:
            The 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 add-ons 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.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_PaulH View Post
              Hello RookieKiwi,

              Thanks for your reply.

              It would simply mean that over the 50 bars the slope is positive.

              Although = 0 would be flat so you may want to stick with greater than zero.
              Thank you for everything my long positions are working well on the analyzer but the short positions seem to be having issues, can you confirm for short it would be a less than 0 numeric value for a downward slope?

              Comment


                #8
                Hello RookieKiwi,

                Thanks for your reply.

                Correct, it would be less than 0.

                You may want to print out the actual values you are getting to help debug should you not get the expected performance. Here is a short video on using a print statement in the strategy builder for debugging to print values being used on a per bar basis: https://paul-ninjatrader.tinytake.co...NV8xMDk5MDc5Nw
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by traderqz, Yesterday, 09:06 AM
                3 responses
                21 views
                0 likes
                Last Post NinjaTrader_ThomasC  
                Started by f.saeidi, Today, 10:19 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by kujista, Today, 06:23 AM
                5 responses
                17 views
                0 likes
                Last Post kujista
                by kujista
                 
                Started by traderqz, Today, 12:06 AM
                3 responses
                6 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by RideMe, 04-07-2024, 04:54 PM
                5 responses
                29 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X