• 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

EMA(200) value

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

    EMA(200) value

    Hello: Can anyone tell me how I can access the value of an EMA (200) from an indicator? I tested with EMA (200). Input [0] but has no worked.

    I need to compare it with the close [0] price.

    Thanks in advance.

    #2
    sometimes seem easier to ask here to read the help, no?I answer myself.

    // Prints the current value of a 20 period EMA using default price type
    double value = EMA(20)[0];
    Print("The current EMA value is " + value.ToString());
    // Prints the current value of a 20 period EMA using high price type
    double value = EMA(High, 20)[0];
    Print("The current EMA value is " + value.ToString());

    Comment


      #3
      Hello AlePaciotti,

      Thank you for your post.

      Glad to hear you resolved your issue. One additional note is that some indicators will not accept a double value as input. It would need to be in a DataSeries. The tutorial below can assist with creating this into a DataSeries.
      http://www.ninjatrader-support.com/H...verview24.html
      Ryan M.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by iq200, 11-09-2019, 08:26 AM
      5 responses
      56 views
      0 likes
      Last Post koganam
      by koganam
       
      Started by johng964, Today, 02:57 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_RyanS  
      Started by spamula, Today, 03:00 PM
      2 responses
      16 views
      0 likes
      Last Post spamula
      by spamula
       
      Started by MARTIN MARTIN, Today, 01:01 PM
      0 responses
      16 views
      0 likes
      Last Post MARTIN MARTIN  
      Started by bouncetherubble, Today, 10:21 AM
      2 responses
      21 views
      1 like
      Last Post bouncetherubble  
      Working...
      X