Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error combining ema with an integer

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

    error combining ema with an integer

    I am trying to code a TS strategy that I use, but keep getting an error that you can not combine an indicator (EMA) with an integer.

    ie: if ((..........) && (EMA (custom indicator(), 5)>-100)[0])

    I just want the 5 period ema of this custom indicator to be above -100.

    What am I missing here?

    #2
    Try this instead:
    Code:
    EMA(custom indicator(), 5)[0] > -100
    Your [] shouldn't be applied to the whole condition. You place it after you call the indicator to tell NinjaTrader which bar's EMA value you want to check against -100.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you, that fixed the integer error, but then 4 or 5 more errors cropped up.

      My problem in all reality is that my lack of C# knowledge and Ninja's language combined with Ninja's lack of examples and tutorials on coding is a horrible combination for me trying to use the Ninja for auto trading. I want to use Ninja for more than just a bracket trader.

      It's funny that I have developed fairly successful strategies through Trade Station, but am having problems coding them into Ninja. It's all a learning curve.

      Bottom line, I'm not ready for Ninja and Ninja is not ready for me. lol

      I'll keep plugging away, but it is a slow go.

      Comment


        #4
        We will be working on bringing more reference examples in the near future as well as in depth training later this year. This however will help illustrate concepts of our architecture more than it will help get you over the hurdle of learning C#. There are some really good online resources/tutorials for learning C#. Google "C# Tutorials".
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        605 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        351 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        560 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        561 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X