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

Indicators

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

    Indicators

    I have some favorite indicators i would like to migrate from another platform to NT. I am not very computer savy. Is there any one who can help me translate into NT code ...?

    #2
    Drop us the code and a description of what the indicator does. Maybe even a screenshot of it in your other platform and we'll see what we can do.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok ...will send them in the am...Thanks

      Comment


        #4
        Indicator Migration

        This is Tradestation code for a double stochastic

        [LegacyColorValue = true];
        {_DStoc: Double Stochastic}
        Inputs: DStLen(NumericSimple);
        Vars: Num(0),Denom(0),Ratio(0),PctK(0),DNum(0),DDenom(0) ,
        DRatio(0),DPctK(0);
        {Stoc}
        Num=C-_Lst(L,DStLen);
        Denom=_Hst(H,DStLen)-_Lst(L,DStLen);
        Ratio=IFF(Denom>0,(Num/Denom)*100,Ratio[1]);
        PctK=IFF(CurrentBar=1,Ratio,PctK[1]+(.5*(Ratio-PctK[1])));
        {DStoc}
        DNum=PctK-_Lst(PctK,DStLen);
        DDenom=_Hst(PctK,DStLen)-_Lst(PctK,DStLen);
        DRatio=IFF(DDenom>0,(DNum/DDenom)*100,DRatio[1]);
        DPctK=IFF(CurrentBar=1,DRatio,DPctK[1]+(.5*(DRatio-DPctK[1])));

        _DStoc=DPctK;

        Comment


          #5
          Do you have a screenshot?

          Thanks.

          Comment


            #6
            Yes ..in a pdf file ...how do I send it...?

            Comment


              #7
              Double Stochastics

              I posted this indicator in the new File Sharing section.



              I created this for a trading group some months ago.
              RayNinjaTrader Customer Service

              Comment


                #8
                Indicator Migration

                That works well.
                Could you apply this zero lag algoirithim to it...? This code is a TS function called "Zero lag"

                [LegacyColorValue = true];

                Inputs: Price(NumericSeries), Length(NumericSimple);
                Vars: aa(0), bb(0), CA(0), CB(0), CC(0), CD(0), Pricea(0) ;

                aa = expvalue(-1.414*3.14159 / Length);
                bb = 2*aa*Cosine(1.414*180 / Length);
                CB = bb;
                CC = -aa*aa;
                CA = 1 - CB - CC;
                CD = CA*Price + CB*CD[1] + CC*CD[2];
                ZeroLag = CD;

                If Length < 3 then ZeroLag = Price;


                Here is the actual TS Doub STO code with the zero lag applied..._DSTOC is the Doub Sto function I emailed prior...


                [LegacyColorValue = true];
                Inputs:OverBot(90),overSold(10),DSTlen(10),Priceac tionfilter(5);
                Vars: DoubleStoch(0),dir(0);

                DoubleStoch =zerolag( _Dstoc(DSTLen),priceactionfilter);

                Plot1(DoubleStoch,"DblStoc");
                Plot2(OverBot,"Over Bot");
                Plot3(OverSold,"Over Sold");


                If Plot1>Plot1[1] Then Dir=1;
                If Plot1<Plot1[1] Then Dir=-1;

                If Dir>0 Then SetPlotcolor(1,cyan);
                If Dir<0 Then Setplotcolor(1,magenta);


                If Dir[1] <0 and Dir > 0 Then alert("DS Rising");
                If Dir[1] >0 and Dir < 0 Then alert("DS Falling");

                Comment


                  #9
                  Unfortunately I can't but anyone willing can take the code I published and modify it.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    Here you are :



                    I didn't know whether you overlay it with DoubleStochastics, but you can certainly do that manually by adding both to the same pane.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Shansen, 08-30-2019, 10:18 PM
                    24 responses
                    940 views
                    0 likes
                    Last Post spwizard  
                    Started by Max238, Today, 01:28 AM
                    0 responses
                    9 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by rocketman7, Today, 01:00 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post rocketman7  
                    Started by wzgy0920, 04-20-2024, 06:09 PM
                    2 responses
                    28 views
                    0 likes
                    Last Post wzgy0920  
                    Started by wzgy0920, 02-22-2024, 01:11 AM
                    5 responses
                    33 views
                    0 likes
                    Last Post wzgy0920  
                    Working...
                    X