Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA variable gets *double" error

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

    SMA variable gets *double" error

    private SMA AvexSlow;

    AvexSlow = SMA(Closes[11], 100)[0];

    gives compile error "cannot implicity convert type double to Ninjatrader.NinjaTraderIndicators.Type.SMA

    any ideas on this? The variable is declared as an SMA... yet on compile is seen to be a double.... help appreciated.

    #2
    Hello elliot5,

    Based on the error your variable AvexSlow is of type SMA so you would need to remove the BarsAgo from the syntax you have shown:

    Code:
    AvexSlow = SMA(Closes[11], 100);
    ​

    Comment


      #3
      Thank you very much - solved the problem. Regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X