Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Slope Indicator With Enhanced Options NT8 in strategy builder

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

    Adding Slope Indicator With Enhanced Options NT8 in strategy builder

    Which is the best way to add this indicator to a strategy so the parameters can be adjusted as needed? Thank you for the helps!

    #2
    Hello AlpinesTrading,

    Thanks for your post.

    You could consider creating user-defined int input properties in the script to allow a user to define the startBarsAgo and endBarsAgo arguments used for the Slope() method.

    Then, you would pass those variables into the Slope() method to define the startBarsAgo and endBarsAgo arguments.

    For example, you could create two user-defined int properties named something like 'StartBars' and 'EndBars'. Then use StartBars and EndBars when calling Slope(). Ex:

    Print(Slope(SMA(20), StartBars, EndBars));

    See the help guide documentation for more information.

    Creating user-defined input properties: https://ninjatrader.com/support/help...d_input_pa.htm
    Slope: https://ninjatrader.com/support/help.../nt8/slope.htm
    <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


      #3
      {
      // Prints the slope of the 20 period simple moving average of the last 10 bars
      Print(Slope(SMA(20), 10, 0));

      }​

      can the SlopeEnhancedOp indicator plot this and I am not sure I follow the inputs for this indicator

      Thanks

      Comment


        #4
        Hello DTSSTS,

        Thanks for your post.

        Are you referring to an indicator from the NinjaTrader Ecosystem User App Share called SlopeEnhancedOp?

        SlopeEnhancedOp: https://ninjatraderecosystem.com/use...d-options-nt8/

        If so, the SlopeEnhancedOp indicator has used-defined inputs that could be used for the indicator (SMA, EMA, HMA, etc) that you select, such as Period, Detrend Period, and Smooth.

        Period is the Period of the moving average, SMA, HMA, etc. DetrendPeriod is the Period for the detrending linear regression (affects nothing if Detrend is not set to true). Smooth is the smoothing parameter.

        If you have this indicator downloaded and imported onto your platform, you could study the code of the SlopeEnhancedOp indicator to see how it functions. To view the code of the imported indicator, open a New > NinjaScript Editor window, open the Indicators folder, and double-click the 'SlopeEnhancedOp' file.

        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.
        Last edited by NinjaTrader_BrandonH; 08-07-2023, 07:23 AM.
        <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


          #5
          Thanks, I did study a bit and decided to just create my own for Slope based on SMA with inputs thanks

          Print(Slope(SMA(20), 10, 0));

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          58 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          133 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X