By using the NTSL (Nelogica Trading System Language), the strategy editor is a tool that enables users to code, test and simulate trading strategies.
There are five different strategy types:
- Indicators
- Color Rules (Paint bar)
- Trading
- Alerts
- Selection (Screening)
To open the Strategy Editor, navigate to the Strategies menu:
Editor Tab
In the editor tab, utilize the options at the top of the tool to create a new strategy, open an existing one, save a new creation, close the current strategy, check for syntax errors, compile, format, and view statistics (Backtest).
In Settings, customize your editor, defining details as color, style schemes and font size.
On the left side of the editor, you'll find the tabs for Strategies, Functions, and Constants.
The Strategies tab will display imported, created, and purchased strategies. Additionally, it will include strategy examples that users can refer to.
Double-click on a strategy to open it.
Note that each strategy opens in a new tab, where you can rename, delete, or create a new one.
In the Functions tab, you'll find a list of functions, the User folder stores the functions created by the user.
When hovering the cursor over a specific function, a hint will be presented containing description, parameters and results of a function.
In the Constants tab, you'll find a list of constants used for inserting parameters into specific functions.
Create and edit your code using the tool's template:
Using the following icons, you can search for specific terms in the code, choose to share your saved strategy with your contacts and communities on Chat Connect, show or hide the file and documentation tabs, as well as access the build menu and execution settings.
Chart Tab
Once the strategy is created, go to the Chart tab. This is where you can view the asset on which you want to apply the strategy.
On the chart, you can identify the points where the rule would trigger buy and sell orders based on the defined parameters, for example.
Split Tab
In the Split tab, you can view the created code alongside the chart.
Compilation Menu
Check for any programming errors in the Compilation menu.
If a function is written incorrectly, information is missing from the code, or if something is out of place, a red line will be highlighted below the issue.
Execution Settings
In the Execution tab, you can change the asset and the chart timeframe.
For execution strategies, you can also adjust the analysis period, Slippage (Ticks), and the number of contracts being analyzed.