Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Super Trend For Ninja Trader Needed

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

    you have to locate and install the following indicators from the forum first
    DynamicSR
    SuperTrend
    CCI_Histogram
    ElliotOscillator

    then compile the code

    Comment


      Originally posted by tortexal View Post
      you have to locate and install the following indicators from the forum first
      DynamicSR
      SuperTrend
      CCI_Histogram
      ElliotOscillator

      then compile the code
      I get that, its just that there are now a few different versions of "supertrend" in this thread... one called TSSupertrend, and one called supertrend. Any of TSSupertrend ones won't work with your code. Seeing "supertrend" in your code I've loaded Eliot Wave's version, but I still get the arguments error mesage when compiling. Can you give me the message # in this thread of the "supertrend" indicator you are using and I'll take it from there? Once sucessful I'll upload it here for the benefit of masses. Thanks!

      Comment


        info

        If I want to use it in automated strategy how can set in order to have signal for entry long or short....what's the best frame and config in order to operate with ES ?

        Tanks




        Originally posted by roonius View Post
        Here is an improved and modified version of SuperTrend.

        It has new features:

        3 modes: ATR, Adaptive, DualThrust.

        Price is selectable now (Close, high, median... etc.)

        SuperTrend can follow the price or selectable moving average of the price.
        If you don't need smoothing, select smoothing period to 1.

        8 types of MA are built in. If you need additional, I bet you will figure out how to modify TSSuperTrend to fit your needs.

        Note: If using DualThrust mode, Period has a big impact. If period is smaller, Supertrend follows closer (more false signals too).

        Big thanks to Elliott Wave, lgarcia, ctrlbrk and others.

        roonius

        Comment


          Flat and Choppy Markets

          I've spent alot of time working with this indicator and have got it reacting nicely when the market makes a good move but things get ugly during consolidation periods.

          I've been working on some ways to filter out the 'chop' but could use some suggestions from the more experienced traders out there;

          Ideas so far are;

          Filtering trades based on;
          * Only trade in direction of EMA(200) -- With this you missed out on as many good trades as filtered out bad (in terms of $$)
          * Using RSI as a secondary signal confirmation -- Idea behind this was to get into a signal early.
          * Using a trend weighted moving average like ADXVMA -- This works well for trailing a moving market and gets in out and quickly but struggles when things go sideways. Still playing with this but could be the most promising so far.
          * Using a measure of slope of the SuperTrend's MA to indicate the strength of the current market trend.
          * Multiple Time Frame -- Using SuperTrend on multiple timeframes to indicate when a signal may be coming up on a higher timeframe. For this i use a colour coded market analyzer with email and SMS alerts.

          I was thinking we could add a third 'neutral' trend category eg Black when certain criteria are met for a neutral market.

          I can do the coding if someone can help with the logic, because at the moment i'm going cross eyed with candle sticks burnt on the back of my retina

          Tim

          p.s I'm trading FOREX
          Last edited by tchapman; 07-15-2009, 01:37 AM.

          Comment


            Originally posted by roonius View Post
            Cannot concentrate today...
            Fixing one part breaking another...
            My apologies.

            Great stuff!

            Not being a coder and taking a look at the "SuperTrendSimpleStrategy" that was posted I've edited a start and stop time which works fine.

            However the issue I'm trying to figure out is the following.

            The supertrend looks at the historical position to determine the next trade.
            So if it's assumes the last trade was a short it will only take a long position based on the market trading through the stop price thus flipping the trend to long. All works great except suppose that the last historical trade before my start time of 9:30 am est was a long at ES 950 at say 8:30 am est ...it will never execute a long even if the market pulls back and happens to be under that price at 9:30est which would be giving it a second chance to enter the long trade. On a day like today the market opened and never looked back and it would have given you a 2nd chance to enter the long.It's a shame to miss a huge run because it needs a flip from long to short or short to long to execute the next trade.

            In other words would it not make sense to have it execute based on the first stop line or stop reversal price it hits regardless of the last historical position?

            TIA
            mpxtrader.
            Last edited by mpxtrader; 07-23-2009, 07:59 PM.

            Comment


              Originally posted by mpxtrader View Post
              Great stuff!

              Not being a coder and taking a look at the "SuperTrendSimpleStrategy" that was posted I've edited a start and stop time which works fine.

              However the issue I'm trying to figure out is the following.

              The supertrend looks at the historical position to determine the next trade.
              So if it's assumes the last trade was a short it will only take a long position based on the market trading through the stop price thus flipping the trend to long. All works great except suppose that the last historical trade before my start time of 9:30 am est was a long at ES 950 at say 8:30 am est ...it will never execute a long even if the market pulls back and happens to be under that price at 9:30est which would be giving it a second chance to enter the long trade. On a day like today the market opened and never looked back and it would have given you a 2nd chance to enter the long.It's a shame to miss a huge run because it needs a flip from long to short or short to long to execute the next trade.

              In other words would it not make sense to have it execute based on the first stop line or stop reversal price it hits regardless of the last historical position?

              TIA
              mpxtrader.
              "SuperTrendSimpleStrategy" is an example how to use indicator in the strategy. It is for educational purposes only.

              Comment


                Originally posted by roonius View Post
                "SuperTrendSimpleStrategy" is an example how to use indicator in the strategy. It is for educational purposes only.
                So the " for educational purposes only" code that would be added in order to accomplish my request would be?


                TIA
                D.

                Comment


                  Originally posted by mpxtrader View Post
                  So the " for educational purposes only" code that would be added in order to accomplish my request would be?


                  TIA
                  D.
                  That would be different strategy with different entry logics

                  Comment


                    Originally posted by roonius View Post
                    That would be different strategy with different entry logics

                    It would need an "if flat" && "execute long/short" which ever comes first condition.

                    If anyone is interested in adding the necessary code please do so and post it!
                    I'm sure it would help a lot of those trying to learn how to play with the code outside of the Wizard especially since many seem to be interested in this thread.

                    TIA

                    D.

                    Comment


                      Originally posted by Elliott Wave View Post
                      I added a fourth algorithm:

                      - 'Fixed Percent' based on Sylvain Vervoort's 'Using Initial Stop Methods' May 2009 S&C article.

                      I also added additional moving average types:

                      -T3, ADVMA, ZeroLagEMA, ZeroLagTEMA, EhlersFilter and JurikJMA (you need the Jurik indicators for it to work).

                      I also changed the plot style from Hash back to a line like every previous incarnation ( I found the hash hard to read).

                      Hello,

                      do you know if there is a version of this for Trade Station

                      tia,
                      skyland

                      Comment


                        Originally posted by skyland View Post
                        Hello,

                        do you know if there is a version of this for Trade Station

                        tia,
                        skyland
                        I don't know if there is a TS version of SuperTrend, I think you're asking in the wrong forum . If there is a port it will be a more basic version without all the additions made by Roonius, myself and others.

                        The fixed percent algorithm will be available for TS on its own as it is from TASC magazine. The previous month's trader's tips by the same author is quite similar to the original SuperTrend algorithm, so that could help you as well.

                        Comment


                          Trying to create an indicator, I'm stuck here:


                          If I add: "if(TSSuperTrend(Parameters).Trend[0] && !SuperTrend(Parameters)[1])"

                          I get multiple error messages:
                          "No overload for method 'TSSuperTrend' takes '1' arguments"
                          "No overload for method 'SuperTrend' takes '1' arguments"


                          I then tried the following:

                          if ((TSSuperTrend(Length, TradingStudies.NinjaScript.Utility.MovingAverageTy pe.SMA, Multiplier, Smooth, TradingStudies.NinjaScript.Utility.SuperTrendMode. ATR).Trend[0] && !SuperTrend(Length, Multiplier)[1]))

                          However, I get the error message: "Operator '!' cannot be applied to operand of type 'double'"





                          Originally posted by roonius View Post
                          Velocity,

                          Thanks.


                          You don't need to add any additional "signal"
                          TSSupertrend already has a boolseries:

                          Uptrend:
                          Code:
                           
                          if(TSSuperTrend(Parameters).Trend[0])
                          {
                           //we are in uptrend
                          }
                          Downtrend:
                          Code:
                           
                          if(!TSSuperTrend(Parameters).Trend[0])
                          {
                           //we are in downtrend
                          }
                          Fresh cross up:

                          Code:
                           
                          if(TSSuperTrend(Parameters).Trend[0] && !SuperTrend(Parameters)[1])
                          {
                           //Trend just changed direction up
                          }
                          Fresh cross down:

                          Code:
                           
                          if(!TSSuperTrend(Parameters).Trend[0] && SuperTrend(Parameters)[1])
                          {
                           //Trend just changed direction down
                          }
                          Last edited by dsherman; 08-08-2009, 07:02 PM.

                          Comment


                            dsherman, unfortunately I'm not familiar with the custom code you use, but if you just type the indicator name and start the paramterts entry with the left curly bracket ( Intellisense would come to help with the available overloads for this....
                            BertrandNinjaTrader Customer Service

                            Comment


                              Market Analyzer

                              How do you get this to work in Market Analyzer? What values do you use? Can't seem to figure it out. I want to have it color cell if crosses over or under trailing line on 5 min. I'm sorry but I don't know how to program

                              Thanks for any help

                              Cheers

                              Comment


                                geotabs, unfortunately you would need to custom code this to work the way you had in mind.
                                BertrandNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Fitspressorest, Today, 01:38 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post Fitspressorest  
                                Started by Jonker, Today, 01:19 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post Jonker
                                by Jonker
                                 
                                Started by futtrader, Today, 01:16 PM
                                0 responses
                                6 views
                                0 likes
                                Last Post futtrader  
                                Started by Segwin, 05-07-2018, 02:15 PM
                                14 responses
                                1,791 views
                                0 likes
                                Last Post aligator  
                                Started by Jimmyk, 01-26-2018, 05:19 AM
                                6 responses
                                844 views
                                0 likes
                                Last Post emuns
                                by emuns
                                 
                                Working...
                                X