Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

double to <double>

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

    double to <double>

    I am trying to take an EMA, of an EMA- just like how the MACD signal line is found from the EMA of the difference of two EMAs. But it gives an error that it cannot convert from double to <double>. So I guess the output of the inner EMA function is a double, and it has to convert that to <double> to take the EMA of it, and it won't?

    Value1[0] = EMA(12)[0] - EMA(26)[0];

    Avg1[0] = EMA(Value1[0], 9);

    #2
    Hello Paracelsus462,

    If the Value1 object is a series, you would remove the "[0]" from Value1 to pass the series into the EMA indicator.

    Avg1[0] = EMA(Value1, 9);

    Please let me know if I can assist further.

    Comment


      #3
      Thank you that fixed it!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      156 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      90 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      140 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      130 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X