Introduction to Lipi Scripting in GoCharting
GoCharting is a powerful charting platform used by traders worldwide. Its scripting language, LIPI, allows users to customize their charts, apply advanced indicators, and publish proprietary strategies. This guide introduces LIPI scripting with key features and practical steps to get started.
What is Lipi?
LIPI is the scripting language for GoCharting. It is designed for creating custom indicators and patterns that can be applied directly to GoCharting charts. With LIPI, traders can:
- Create custom indicators
- Enhance chart visualizations
- Publish and share indicators
- Automate calculations and trading rules
Writing and Reading Lipi Code
Creating a New Script
To start writing a Lipi script in GoCharting:
- Open the Script Editor: Click on the Script option in the bottom bar.
- Create a New Script: Select New, then provide a name for your script.
- Write the Code: Use the code editor to input your LIPI code.
- Save the Script: Click the Save button to store your script.
- Add to Chart: Press the Add button to apply your script as an indicator on the chart.
Reading the Code of an Indicator
To read the code of an existing indicator:
- Click on the arrow to open the indicator’s information.
- Click on the curly brackets icon to view the code for the indicator.
Structure of a Lipi Script
A typical Lipi script consists of:
- Input Parameters: Define customizable settings for the indicator (e.g., period, color, line style).
- Data Processing: Include calculations using price, volume, or custom data.
- Output Visualization: Specify how the indicator will appear on the chart (e.g., lines, histograms, labels).
Example
indicator("Custom Moving Average", overlay=true)
length = input(14, "Length")
smaValue = talib.sma(close, length)
plot(smaValue, color=color.blue, linewidth=2)
Explanation:
input()
: Adds a parameter to customize the moving average length.talib.sma()
: Calculates the simple moving average.plot()
: Displays the moving average line on the chart.
Publishing Indicators
1. Publish Your Own Indicator
To publish your own indicator for the community:
- Click on the Script option in the bottom bar.
- After generating and saving your code as mentioned above, click on the Publish button.
- You will see four options for publishing:
- Private: Keeps your indicator visible only to you.
- Public: Makes your indicator available to the entire community.
- Protected: Shares the indicator but keeps the code private.
- Open-Source: Shares both the indicator and its code publicly.
2. Check Out Your Own Published Scripts
To view the list of your published scripts:
- Go to the top-left corner of the chart and click on the User Profile icon.
- Navigate to the Scripts tab to see all your published scripts.
3. Check Out Your Own and Community Scripts
To explore both your scripts and those shared by the community:
- Click on the FX Study option in the top bar.
- Select Scripts to view the available indicators.
LIPI scripting transforms GoCharting into a flexible tool for advanced technical analysis. By understanding how to read, write, and publish LIPI scripts, you can unlock new trading possibilities tailored to your strategies.