Welcome to Creating a New PredictModelTest Strategy. This section will describe how to copy the existing PredictModelTest NinjaScript file and rename it to your own class name.
If NinjaTrader is running, please go to the control panel then New -> NinjaScript Editor. The dialog should look like this. Double click on Strategies on the right side.
The next step is to copy the strategy. Double click on the DST folder, then single click on DSTPredictModelTest.
Right click in the text window portion of the dialog and select the Save As... menu item.
Then enter a new file name for your strategy. We're going to enter NewDSTPredictModelTest for our strategy, but this can be whatever you would like.
Click on OK to save the new file. The NinjaScript Editor will add the new file to our DST Strategies.
This has created a new file but we need to rename the class as well. There is one place we need to replace the old DSTPredictModelTest name with our new NewDSTPredictModelTest name.
We could either just select the DSTPredictModelTest and rename it to our new class name or we can use the Find and Replace method.
If we click on the Find button at the top of the screen we can do a find and replace for DSTCreateModelTest and replace it with a new name.
If we click on the Quick Replace button and type in DSTPredictModelTest in the Find what box then type in the name of the strategy we want to replace it with. In our case, we will change it to NewDSTPredictModelTest.
Then we click on Replace All to replace all of the instances of DSTPredictModelTest with NewDSTPredictModelTest. The next step is to save the strategy and click on Compile to make sure our changes will work.
Click on the Save button at the top of the screen, then compile.
If the compile is successful then you are ready to modify the new file and add your new indicator data using AddDSTIndicator. Please remember that if we changed the AddDSTIndicator methods in the CreateModelTest file we need to change the PredictModelTest file to match our new changes.
Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.