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

we need indicators !!!

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

    #16
    Rei

    Thanx much also Gump, I looked at your code and found one improvement I could make to mine.

    Comment


      #17
      Originally posted by Bluemaze View Post
      It worked,
      Thanx much Ray, first day on NT here, I am as green as they get :-)

      Welcome aboard!
      RayNinjaTrader Customer Service

      Comment


        #18
        I have also switched from Tradestation to Ninjatrader and I'm glad I did.
        It also took me a while to get familiar with ninjascript (and I'm still working on it, C# is new for me too) but it is WAY more powerful than Tradestation EL.

        I still feel that the very simple things are more quickly implemented in EL than in NTscript, however the more complicated stuff is easier in NTscript. One of the reasons is that you can structure your code much better in NTscript than in EL.

        For the people who need more indicators, maybe a seperate section in this supportforum can be setup where NT users can share their indicators. Personally I prefer that the developers at Ninjatrader company focus on debugging and adding new features to NT instead of translating hundreds of indicators.

        Comment


          #19
          T3 Moving Average Indicator

          Hello, Would it be possible for NinjaTrader to create the Tim Tillson's T3 Moving Average Indicators...the T3, T5 and T8. They are fairly common indicators. I would like to be able to then create a crossover strategy using the T3's not unlike the "Sample moving average crossover" strategy provided in your strategies folder. Maybe you could make just the one indicator and be able to adjust the periods instead of making three seperate indicators. I just need to have them seperate to create the crossover strategy.

          A version of the indicator is located at http://www.amibroker.com/library/detail.php?id=852.

          Another sample is in Metastock code:This is the 3 period:
          e1:=Mov(C,3,E);
          e2:=Mov(e1,3,E);
          e3:=Mov(e2,3,E);
          e4:=Mov(e3,3,E);
          e5:=Mov(e4,3,E);
          e6:=Mov(e5,3,E);
          c1:=-.7*.7*.7;
          c2:=3*.7*.7+3*.7*.7*.7;
          c3:=-6*.7*.7-3*.7-3*.7*.7*.7;
          c4:=1+3*.7+.7*.7*.7+3*.7*.7;
          c1*e6+c2*e5+c3*e4+c4*e3;

          Thanks for your help.

          Comment


            #20
            Hi,

            I will add this request to our list of features for future consideration. I can not guarantee if and when we could accomodate this request at this time.
            RayNinjaTrader Customer Service

            Comment


              #21
              If anyone in this forum knows how to write of convert the code below for the T3's it would be greatly appreciated. I also have attached the code from eSignal. Maybe it can help.

              // NOTE:
              // This efs requires amStudies.efsLib in the FunctionLibrary folder.
              // If you do not have this file you can download it at the link below.
              // http://share.esignal.com/groupconten...ies&groupid=10
              var fpArray = new Array();
              function preMain() {
              setPriceStudy(true);
              setStudyTitle("T3 MA");
              setCursorLabelName("T3",0);
              setDefaultBarFgColor(Color.blue,0);
              setPlotType(PLOTTYPE_LINE,0);
              setDefaultBarThickness(1,0);
              askForInput();

              var x=0;
              fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER);
              with(fpArray[x++]){
              setLowerLimit(1);
              setDefault(6);
              }
              fpArray[x] = new FunctionParameter("Factor", FunctionParameter.NUMBER);
              with(fpArray[x++]){
              setUpperLimit(1);
              setLowerLimit(0);
              setDefault(0.7);
              }
              fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
              with(fpArray[x++]){
              addOption("open");
              addOption("high");
              addOption("low");
              addOption("close");
              addOption("hl2");
              addOption("hlc3");
              addOption("ohlc4");
              setDefault("close");
              }
              fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
              with(fpArray[x++]){
              setDefault();
              }
              fpArray[x] = new FunctionParameter("Interval", FunctionParameter.STRING);
              with(fpArray[x++]){
              setDefault();
              }
              fpArray[x] = new FunctionParameter("Offset", FunctionParameter.NUMBER);
              with(fpArray[x++]){
              setDefault(0);
              }
              fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
              with(fpArray[x++]){
              setName("Show Parameters");
              setDefault(false);
              }
              }
              var amLib = addLibrary("amStudies.efsLib");
              var bInit = false;
              var xT3 = null;
              function main(Length,Factor,Source,Symbol,Interval,Offset,P arams) {
              if(bInit == false){
              with( amLib ) {
              if(Symbol == null) Symbol = getSymbol();
              if(Interval == null) Interval = getInterval();
              var vSymbol = Symbol+","+Interval;
              xT3 = offsetSeries(amT3(Length,Factor,eval(Source)(sym(v Symbol))),Offset);
              setShowTitleParameters(eval(Params));
              bInit = true;
              }
              }
              return getSeries(xT3);
              }

              Comment


                #22
                Dwalls,

                What sort of moving average do these indicators need? The original AmiBroker code you posted specifies "Mov", while the link on AmniBroker specifies "AMA" (is that the same as KAMA?).

                Also on the T3 the code you posted uses "0.7" whereas the link specifies "5". So we need to make that value a parameter, but what is it?

                Answer these questions and perhaps a screenshot and it should be pretty simple to knock up.

                Comment


                  #23
                  Fwiw, most traders that I know that use to work with the T3 or some derivation, including myself, have since switched to using the Hull Moving Average or HMA which is already available as a standard indicator. At the time that I switched (using another platform) I recall convincing myself that the HMA was smoother yet exhibited less lag than the T3 indicator for my applications. Your mileage may vary.

                  Regards,

                  Whitmark
                  whitmark
                  NinjaTrader Ecosystem Vendor - Whitmark Development

                  Comment


                    #24
                    Gumphrie,
                    Here is another similar formula I found:

                    Description:

                    Trading system based on cubing of function (1+a)-ax^2 where a is the amplification ( 0 < a < 1.0, I use 0.7) and en is the exponentially smoothed average of the closing price.

                    Formula:

                    /* T3 trading system */
                    a = 0.7;
                    n = 2;

                    alpha = 2/(n + 1);
                    e1 = ema(close, n);
                    e2 = ema (e1, n);
                    e3 = ema (e2, n);
                    e4 = ema (e3, n);
                    e5 = ema (e4, n);
                    e6 = ema (e5, n);

                    T3 = -a^3 * e6 + (3 * a^2 +3 * a^3) * e5 + (-6 * a^2 - 3 * a - 3 * a^3) * e4 + (1 + 3 * a + a^3 + 3 * a^2) * e3;

                    graph0 = close;
                    graph1 = T3;

                    SELL = cross ( Close, T3 );
                    BUY = cross (T3, Close );
                    SHORT = cross ( Close, T3);
                    COVER = cross (T3, Close );

                    Maybe this will help you.Thanks for your help.

                    Comment


                      #25
                      Dwalls,

                      Is this correct? (find attached).
                      Don't forget to compile it in the Ninjascript Indicator ediror after placing it in "My Documents\NinjaTrader 6\bin\Custom\Indicator"

                      - attachment removed -
                      Last edited by Gumphrie; 07-12-2007, 02:04 AM.

                      Comment


                        #26
                        Thanks for contributing Gumphrie!

                        Did you know that you can export a script via File > Utilities > Export NinjaScript ? This creates a zip file that people can then import which automatically compiles.
                        RayNinjaTrader Customer Service

                        Comment


                          #27
                          Gumphrie,

                          Thanks for your help.
                          It is suppose to be an overlay of price just like any other moving average.
                          I attached a screen shot of the indicator on eSignal. The yellow line is the 3 period and the white line is the 5 period. I cant seem to get a picture of the eSignal Study Properties so I will type them out:

                          Parameter Value Default
                          Lenght1 5 5
                          Lenght2 3 3
                          Factor 0.7 0.7
                          Source close close
                          Symbol n/a n/a
                          Interval n/a n/a
                          Offset 0 0
                          Show Parameters false false
                          Linecolor1 white white
                          Linecolor2 yellow yellow

                          I hope this helps.
                          Thanks again.
                          Attached Files

                          Comment


                            #28
                            You can add the line within the Initialize() method:

                            Overlay = true;

                            and then recompile or;

                            When adding the indicator to the chart, just change the panel property to a value of 1.
                            RayNinjaTrader Customer Service

                            Comment


                              #29
                              Thanks NinjaTrader Ray,

                              When I did as you suggested, the chart flatlines. I can see the red indicator line well below price, its way down there and flatlined.
                              I also added the also:

                              PriceTypeSupported = true;

                              and that didnt help either.

                              Thanks for your help.

                              Comment


                                #30
                                Thought that would happen (which is why a screenshot helps).
                                Try the attached version. The zip file is a NinjaScript export file.
                                Attached Files
                                Last edited by Gumphrie; 07-12-2007, 02:20 AM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by DJ888, Yesterday, 06:09 PM
                                2 responses
                                9 views
                                0 likes
                                Last Post DJ888
                                by DJ888
                                 
                                Started by jeronymite, 04-12-2024, 04:26 PM
                                3 responses
                                40 views
                                0 likes
                                Last Post jeronymite  
                                Started by bill2023, Today, 08:51 AM
                                2 responses
                                16 views
                                0 likes
                                Last Post bill2023  
                                Started by sidlercom80, 10-28-2023, 08:49 AM
                                167 responses
                                2,260 views
                                0 likes
                                Last Post jeronymite  
                                Started by warreng86, 11-10-2020, 02:04 PM
                                7 responses
                                1,362 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Working...
                                X