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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      22 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      280 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      279 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      130 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      90 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X