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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      50 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      69 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      36 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      96 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      59 views
      0 likes
      Last Post PaulMohn  
      Working...
      X