Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New to NT. Want to re-create SMR indicator lines

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

    New to NT. Want to re-create SMR indicator lines

    Hey, Im new to NinjaTrader and I want to be able to re-create SMR charts two indicator lines and I have no clue how to do that. The fast line is basically a SMA of closing price of the last 3 days - the SMA of closing price of the last 10 days. The slower line is a SMA 14 of the fast line. That's about it. Some help on this would be appreciated!

    David

    #2
    Hello David,

    Calling SMA's with different amounts of historical data would be very complicated. Indicators when called, use the same amount of historical data as is loaded on the chart.

    It would be simple to call these using different periods. This would change the amount of bars used in the SMA calculation but the indicator will still process all of the historical data loaded on the chart and doesn't cause the indicator to ignore some of the historical data.

    For example
    Print(SMA(3)[0] - SMA(10)[0]);

    To have different amounts of historical data loaded, this would have to be achieved by modifying the SMA to have a value that limits the number of days that will be processed.

    It would be possible to tell the indicator not to start processing until after a certain amount of days in historical data with custom code.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Give this a try.

      Originally posted by Dmoss3 View Post
      Hey, Im new to NinjaTrader and I want to be able to re-create SMR charts two indicator lines and I have no clue how to do that. The fast line is basically a SMA of closing price of the last 3 days - the SMA of closing price of the last 10 days. The slower line is a SMA 14 of the fast line. That's about it. Some help on this would be appreciated!

      David
      Attached Files

      Comment

      Latest Posts

      Collapse

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