Announcement

Collapse
No announcement yet.

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

    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:	159
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.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

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