The NinjaScript Editor can automatically generate code for you by accessing the right mouse button click context menu sub menu's "Insert Action..." and/or "Insert Condition...". These features can help you in your learning curve of NinjaScript and C# and also provide correct syntax in the event that you need a little assistance.
Using the image below for an example:
1. After typing in "if (" right mouse button click and select "Insert Condition..."
2. The Condition Builder will appear which allows you to point and click to create conditions. Below we have build a condition that checks to see if the 5 period EMA has crossed above the 15 period EMA within the last bar.
3. Press "OK" to have the Condition Builder generate the NinjaScript program code
The result is the code generated below.