Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two TradeStation indicators for translation, please

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

    Two TradeStation indicators for translation, please

    Here are two very simple, useful TS8 indicators that I cut and pasted together some years ago with a little help from the TS forums, ie. I'm not a programmer, so if anyone would be willing to code them in Ninjascript, I'd really appreciate it. FWIW, I emailed 3 NS Partners for a quote : two did not reply & the third quoted $400 which is above my "learn how to paste it together yourself" level !

    The first is a Double Smoothed Stochastic which I use as confirmation of "trade direction & hold". The second is a double, smoothed momentum : fast (line) and slow (histogram) whch has multiple uses once you observe it awhile.

    Via the two links below, I'm showing them in separate sub-windows for clarity, but in TradeStation I drag them into one window to save space (not sure if this is possible in Ninja charting, so if they could be coded as one indicator, so much the better). When combined into a single sub-window, I use the DSS scaling, not the momentum scaling.

    Anyone, please ?

    J.



    #2
    We have a new support rep who will provide NinjaScript support. As part of his training process, I will have him review these scripts and see if it would make sense for him to convert. Give us a week.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thank-you, Ray !

      J.

      Comment


        #4
        Hi jtrade,
        thanks for asking & posting those, i am reviewing them for conversion to NT.

        Have a great day,
        Bertrand

        Comment


          #5
          And thank-you, Bertrand !

          J.

          Comment


            #6
            Hi jtrade,
            for the first part of your request I would recommend using our native Stochastics indicator, with the following inputs:
            PeriodD 12, PeriodK 14, Smooth 8

            I compared the values in TradeStation + NinjaTrader on a 1min ES chart and you should be fine.

            Working currently on the second part of your request.

            Take care,
            Bertrand

            Comment


              #7
              oops

              Thanks Bertrand.... I just went through my notes from 2 years back and am very embarrassed to see that I ditched the double-smoothed sto for a standard one : so sorry. They are still very useful settings...

              Looking forward to your fast slow momentum coding and if possible being able to display in the same window as the sto.

              Comment


                #8
                Double Smoothed Momentum for NinjaTrader

                Originally posted by jtrade View Post
                Thanks Bertrand.... I just went through my notes from 2 years back and am very embarrassed to see that I ditched the double-smoothed sto for a standard one : so sorry. They are still very useful settings...

                Looking forward to your fast slow momentum coding and if possible being able to display in the same window as the sto.
                Hey jtrade,
                no problem, we all have gone through that at times.

                Please find attached the second part of your conversion request, shorter momentum will display as a line, the longer as a histogram, you can change the width as needed in the properties.

                Good trading,
                Bertrand
                Attached Files

                Comment


                  #9
                  Fantastic, Bertrand : thank-you so much !

                  J.

                  Comment


                    #10
                    question

                    Originally posted by NinjaTrader_Bertrand View Post
                    Hey jtrade,
                    no problem, we all have gone through that at times.

                    Please find attached the second part of your conversion request, shorter momentum will display as a line, the longer as a histogram, you can change the width as needed in the properties.

                    Good trading,
                    Bertrand

                    does anyone has this code for tradestation please

                    Comment


                      #11
                      Hello, I realize this may not be the right place to ask this question, but I struggle to convert this TS code to ninja

                      Input:Coefdwn(2.1),Coefup(2.3);
                      Plot1((Average((RSI(Close,14)),6))+((Coefup*Averag e(TrueRangeCustom((RSI(Close,14)),(
                      RSI(Close,14)),(RSI(Close,14))),15))),"Plot1");
                      Plot2((Average((RSI(Close,14)),6))-(Coefdwn*(Average(TrueRangeCustom((RSI(Close,14)),
                      (RSI(Close,14)),(RSI(Close,14))),15))),"Plot2");

                      With TrueRangeCustom function code as follows:

                      Inputs: HPrice(NumericSeries), LPrice(NumericSeries), CPrice(NumericSeries);
                      Variables: THigh(0), TLow(0);
                      If CPrice[1] > HPrice Then
                      THigh = CPrice[1]
                      Else
                      THigh = HPrice;
                      If CPrice[1] < LPrice Then
                      TLow = CPrice[1]
                      Else
                      TLow = LPrice;
                      TrueRangeCustom = THigh - TLow;

                      I will appreciate Any sugestions!

                      Thank you and HAPPY NEW YEAR!

                      Comment


                        #12
                        xtrender,

                        We are not TS experts here. As a last resort you can also try contacting one of the 3rd party NinjaScript Consultants to get the conversion done for you: http://www.ninjatrader.com/webnew/pa...injaScript.htm
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          I can code a little in C# myself, however some features of ninja script is confusing to me like numericseries type in TS, what that would be in ninja script? Is it the same as dataseries?

                          Thank you.

                          Comment


                            #14
                            Hi xtrender, yes good spot, although this is limited to the use as input to functions in TradeStation. In NinjaScript you have the DataSeries class which generally holds a history fitting the bars present on a chart, please also see this link - http://www.ninjatrader-support.com/H...iesObject.html

                            For our indicator building tutorials you can check here - http://www.ninjatrader-support.com/H...verview18.html

                            For the trueRange calculation, you can check the sharing section of this forum for the Twiggs Money Flow I posted sometime ago, parts of it are already coded in there - this may be a good starting point for you.

                            Comment


                              #15
                              Thank you for your help.

                              Your code is precisely what I neeed, except for one unfortunate detail.
                              I need to pass RSI(Close,14,3)instead of price.
                              I have tried to wright TrueRangeCustom as a method:

                              publicdouble tRange(double HPrice, double LPrice, double CPrice)
                              {

                              //define the true high
                              if (CPrice > HPrice)
                              THigh = CPrice;
                              else
                              THigh = HPrice;

                              //define the true low
                              if (CPrice < LPrice)
                              TLow = CPrice;
                              else
                              TLow = LPrice;

                              //calculate the true range
                              double TR = THigh - TLow;
                              return TR;
                              }
                              double part2 =Coefup*SMA(tRange(RSI(Close,14,3),RSI(Close,14,3),RSI(Close,14,3)),15)[0];

                              I get this message: The best overloaded method match for tRange (double,double,double) has some invalid arguments... can not convert argument1,2,2 to double.
                              I understand this is beyond and above ...however if you can make a sugestion I will truly appreciate.

                              I am trying to recreate volatility bands formula...
                              Plot1((Average((RSI(Close,14)),6))+((Coefup*Averag e(TrueRangeCustom((RSI(Close,14)),(RSI(Close,14)), (RSI(Close,14))),15))),"Plot1");

                              It could be valuable to any NinjaTrader user.

                              Thank you and Happy New Year!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              574 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              333 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
                              553 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              551 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X