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

TSI zero line

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

    TSI zero line

    I always believed at the very least TSI needed a zero line if not a signal line too.
    I added a zero line to ninja 8 Slow Stochastics and it works so I tried the same kind of code to a line for TSI and it doesn't. You'll see it right after the TSI line is drawn.
    Here's the TSI section involved. I renamed the indicator so I could still plot a TSI on charts until I get it fixed.
    I'm also uploading the way I did on the Stoch just changing 50 to 0.
    Code:
    	public class TSIme : Indicator
    	{
    		private double				constant1;
    		private	double				constant2;
    		private double				constant3;
    		private double				constant4;
    		private Series<double>		fastEma;
    		private Series<double>		fastAbsEma;
    		private Series<double>		slowEma;
    		private Series<double>		slowAbsEma;
    
    		protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    				Description					= NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionTSI;
    				Name						= "TSIme";
    				Fast						= 3;
    				IsSuspendedWhileInactive	= true;
    				Slow						= 14;
    
    				AddPlot(Brushes.DarkCyan, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameTSI);
    				AddLine(Brushes.Yellow,	0, NinjaTrader.Custom.Resource.NinjaScriptIndicatorZero); 
    			}
    			else if (State == State.Configure)
    			{
    				constant1	= (2.0 / (1 + Slow));
    				constant2	= (1 - (2.0 / (1 + Slow)));
    				constant3	= (2.0 / (1 + Fast));
    				constant4	= (1 - (2.0 / (1 + Fast)));
    				fastAbsEma	= new Series<double>(this);
    				fastEma		= new Series<double>(this);
    				slowAbsEma	= new Series<double>(this);
    				slowEma		= new Series<double>(this);
    			}
    		}
    		
    		protected override void OnBarUpdate()
    Attached Files

    #2
    Hello simpletrades,

    Thanks for your post.

    When following your process you will end up with an error when you compile.

    Please change the AddLine statement to: AddLine(Brushes.Yellow, 0, "Zeroline");
    Note that "ZeroLine" can be any text as long as it is unique.

    Reference: http://ninjatrader.com/support/helpG...s/?addline.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I still don't get it which is too bad but I can just draw a horizontal line on tsi at zero anytime I load it.

      Comment


        #4
        Hola,

        Alguno tiene el indicador TSI para NINJA 8, que tenga los mismos parámetros que el indicador para tradingview


        Click image for larger version

Name:	image.png
Views:	73
Size:	33.4 KB
ID:	1267486

        Comment


          #5
          Hello miguelsi,

          Thanks for your notes.

          I am not aware of an existing indicator called TSI for NinjaTrader 8. However, you could browse the NinjaTrader Ecosystem User App Share linked below for a possible solution.

          Ecosystem User App Share: https://ninjatraderecosystem.com/user-app-share/

          This forum thread will also be open for other community members to share their insights on the topic.

          The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Perr0Grande, Today, 08:16 PM
          0 responses
          2 views
          0 likes
          Last Post Perr0Grande  
          Started by elderan, Today, 08:03 PM
          0 responses
          3 views
          0 likes
          Last Post elderan
          by elderan
           
          Started by algospoke, Today, 06:40 PM
          0 responses
          10 views
          0 likes
          Last Post algospoke  
          Started by maybeimnotrader, Today, 05:46 PM
          0 responses
          9 views
          0 likes
          Last Post maybeimnotrader  
          Started by quantismo, Today, 05:13 PM
          0 responses
          7 views
          0 likes
          Last Post quantismo  
          Working...
          X