PDA

View Full Version : error combining ema with an integer


Thomas
08-15-2007, 07:55 PM
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?

NinjaTrader_Josh
08-15-2007, 08:41 PM
Try this instead:
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.

Thomas
08-16-2007, 05:14 AM
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.

NinjaTrader_Ray
08-16-2007, 05:40 AM
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".