Introduction Visual HaasScripts
The HaasOnline Visual Editor, a dynamic tool designed to transform the way you code by visually connecting blocks. This method is not only intuitive but also a powerful approach to script creation. The Visual Editor offers nearly all the functionalities of the Script Editor, with the exception of loops.
Getting Started with the Visual Editor
- Accessing the Editor:
- Navigate to HaasScript in the HaasOnline interface and select Web Editor.
- To start a new script, click the “+” sign at the top left of the toolbar.
- Choose “Visual script,” name your script “Hello World,” and hit “Save.”
- Understanding the Interface:
- On the left side, you’ll find the command tab, which organizes all available commands/blocks by category, including your favorites.
- Use the “search” function to easily find specific commands. For instance, type “IndicatorContainer” to locate related blocks.
- Building Your Script:
- Each block displays the Command Name at the top (e.g., IndicatorContainer).
- The “I” icon on the top right provides detailed information about the block.
- Input parameters are indicated by green circles on the left, while outputs are shown on the right.
- Modifying Blocks:
- Right-click on a block for additional options. For example, right-click on the IndicatorContainer and select “Toggle connector” to add an “execute” input parameter.
- Repeat the process to remove the added parameter.
- Linking Blocks Together:
- Add the “EasyRSI” block to your script. Click and drag to position it.
- Connect the blocks: Drag from the output of “EasyRSI” to the input (signal[]) of “IndicatorContainer.”
- Configure “EasyRSI” by entering “1” for ChartIndex and “RSI” for [name].
By following these steps, you’ll start to see how intuitive and flexible the Visual Editor is for creating complex trading scripts. Remember, the key is to experiment and explore the possibilities within this visual environment. Happy scripting!