• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sma of.....

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

    Sma of.....

    Hi,

    I would like to code an indicator of a sma of a specific value:

    double test = Math.Min (High[0] - Open[0], Open[0] - Low[0]);
    Value.Set (SMA (test, 20)[0]);

    But this is not working. Mayby I have to create a method ?
    Thank you for your help.

    #2
    Ironman,

    SMA's are averages of several past values. You would need to store this "test" value in another dataseries.

    Here is an example of how to do that.

    http://www.ninjatrader.com/support/f...ead.php?t=7299
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thank you, it works.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PeterGolz, 01-17-2020, 10:42 AM
      11 responses
      71 views
      0 likes
      Last Post reubenlasky  
      Started by utilizator, Today, 11:36 AM
      0 responses
      4 views
      0 likes
      Last Post utilizator  
      Started by EnveousColnago, Today, 07:24 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by tornadoatc, Today, 10:31 AM
      0 responses
      3 views
      0 likes
      Last Post tornadoatc  
      Started by EnveousColnago, Yesterday, 05:43 PM
      5 responses
      30 views
      0 likes
      Last Post EnveousColnago  
      Working...
      X