NinjaScript > Educational Resources > Tutorials > Strategies > Beginner - Simple MA Cross Over > Set Up |
|
The first step in creating a custom strategy is to use the custom strategy wizard. The wizard provides two options:
1. Within the NinjaTrader Control Center window select the Tools > New NinjaScript > Strategy... menu 2. Press the "Next >" button
3. Enter the information as shown above 4. Press the "Next >" button
Defining Input Parameters Below you will define your strategy's input parameters. These are any input parameters that can be changed by the user when running or backtesting a strategy. If your strategy does not require any parameters leave the "Name" fields blank.
5. Add the inputs as per the image above
Defining Conditions and Actions Below you can define conditions that trigger user defined actions such as placing orders, drawing on a chart or creating an alert.
Notice how there are two buttons on the screen below:
View Code... - Pressing this button loads the strategy code in the NinjaScript Editor for viewing purposes only. This is a great approach if you are new to programming or you want to see how the strategy wizard dynamically generates the correct script code on the fly.
Unlock Code - Pressing this button loads the strategy code in the NinjaScript editor for further manual editing. Once this button is pressed, you can NOT go back to the Wizard for strategy construction and editing.
If you want to proceed with this tutorial through self programming continue here after pressing the "Unlock Code" button. |