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

Supertrend Indicator for NT8

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

    Supertrend Indicator for NT8

    Hi all,

    I wonder whether or not, there is currently a free version available of the TSSupertrend Indicator for NT8? I would like to use it for a new strategy development...

    Thanks

    #2
    Hello Sweet&Sour,

    Welcome to the NinjaTrader forums!

    (edit, updated link to new location)
    There is a version of the TSSupertrend that was ported to NinjaTrader 8 linked below.
    This is a conversion of the NT7 indicator TSSuperTrend. Please contact the original author for any questions or comments. Note: SMMA and Adaptive mode not yet available.
    Last edited by NinjaTrader_ChelseaB; 08-28-2022, 04:48 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks NinjaTrader_ChelseaB. This works fine...

      Comment


        #4
        Is there a way to backtest this indicator in "strategies" (NT8)?

        Comment


          #5
          Hello MiroM,

          The backtesting tools are specifically for Strategies, to test an indicator would require that you make a strategy that uses your indicator in some way.

          I would suggest looking at the SampleMACrossOver strategy and how the indicators are being used in that script. The Fast and Slow period inputs are controlled by the backtest/optimizer which in turn affects the indicators logic.


          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Hello, and thank you for your fast response, as always.

            Is anyone willing to help me make a strategy? It shouldn't take a lot of time, the script is very short

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello Sweet&Sour,

              Welcome to the NinjaTrader forums!

              There is a version of the TSSupertrend that was ported to NinjaTrader 8 linked below.
              http://ninjatrader.com/support/forum...php?linkid=695
              Hi Chelsea,
              I'm using the indicator you wrote and I'm able to get the value of the green upper lines when going long, but not the red for the shorts--it reads as 0 with superTrend[0]. I'd like to use it as my stop loss. I tried computing it with a formula I found:
              (High + Low) / 2 + multiplier × ATR but don't seem to be getting the same results as the red lines shown by the indicator.

              Comment


                #8
                Hello shorty,

                This would not be an indicator I have written. This indicator was originally created by Sergio66 for NinjaTrader 7.

                Below is a link to the original authors work.
                https://ninjatraderecosystem.com/use...ssupertrend-2/

                The NinjaTrader 8 version was ported from 7 to 8 by NinjaTrader_Paul.

                That said, which line of code are you referring to in the TSSupertrend indicator?

                Adding this to a chart, are you trying to use a specific plot or drawing object anchor you are seeing on the chart for the price of your order? If so, just call the indicator and use that plot..
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Chelsea,

                  I'm using the indicator in a strategy for the conditional logic for longs & shorts. My I have a class member private TSSuperTrend superTrend. When I call superTrend[0] and the trend is bullish I'm able to get the value of the green lower band. Then I enter long and use that as my stop loss and try for a 1:1 RR. But, when the trend is bearish, the value for superTrend[0] is just 0, and so I can't set my stop loss and calculate points risked for shorts the way that I'd like to.





                  Comment


                    #10
                    Another note - when I add the indicator to my charts, I do see both the green and red upper and lower bands, so I know the indicator itself is working, its just that for some reason in the strategy I wrote I can't successfully read the upper red band once the trend goes bearish.

                    Comment


                      #11
                      Hello shorty,

                      When the trend is bearish, what you are seeing on the screen that you want a price from? Is that plot showing a value in the Data Box window?

                      Are you printing these values with labels?

                      If so, provide the output saved to a text file.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Hi,

                        Here is an image and a code snippet. You can see in my print statements that I'm reading the green lower band price no problem, but not sure why the red is always giving me 0 rather than the price. What's odd is that when I add the indicator to the chart it shows just fine, so not sure what would cause that.

                        Chart Screen Shot

                        Code:
                         if (LongSignal(Close, dema, superTrend))
                        {
                        Print(string.Format("{0} buy signal. ST Indicator lower line is {1}", Time[0], superTrend[0]));
                        
                        }
                        
                        // Shorts
                        
                        if (ShortSignal(Close, dema, superTrend))
                        {
                        
                        Print(string.Format("{0} sell signal. ST Indicator upper line is {1}", Time[0], superTrend[0]));
                        
                        }
                        This is how I instantiate the variable:
                        Code:
                         // Best practice is to instantiate indicators in State.DataLoaded.
                        superTrend = TSSuperTrend(SuperTrendMode.ATR, 14, 3, MovingAverageType.HMA, 14, true, true, false);

                        Comment


                          #13
                          Hi Chelsea, I figured it out - instead of superTrend[0] I was able to use superTrend.DownTrend[0]! Thanks for the help & encouragement!

                          Comment


                            #14
                            hello im new here and i wonder if i can get the indicators super trend and moving average for free ?

                            Comment


                              #15
                              Hello RayenTrader,

                              Welcome to the NinjaTrader forums!

                              Post #2 has a link to the Tssupertrend indicator on the NinjaTrader Ecosystem User App Share.
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kaledus, Today, 01:29 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post Kaledus
                              by Kaledus
                               
                              Started by PaulMohn, Today, 12:36 PM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by yertle, Yesterday, 08:38 AM
                              8 responses
                              37 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Started by rdtdale, Today, 01:02 PM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by alifarahani, Today, 09:40 AM
                              3 responses
                              19 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X