Welcome to this new tutorial that helps traders and investors better understand the powerful Pine Script programming language v5.
In this tutorial, we will program together three Input variables:
Color type Input: a color input is a parameter that allows specifying a custom color for the indicator or script. It can be used to set the color of lines, areas, texts, or other graphical components in the indicator.
Float type Input: a float input is a parameter that allows specifying a floating-point numerical value for the indicator or script. It can be used to set parameters such as threshold levels, indicator sizes, or any other numerical value that requires decimal precision.
Integer type Input:an integer input is a parameter that allows specifying an integer numerical value for the indicator or script. It can be used to set parameters such as moving average periods, length of a time interval, or any other integer numerical value.
IMPORTANT: The code used in this tutorial has been created purely for educational purposes.
Our indicator is a simple indicator that plots the close data of the underlying asset on the chart in a weighted manner. The displayed data is the sum of the close price plus 20%. The goal of the indicator is to provide a fully dynamic tool that can vary its parameters from the user interface and update automatically.
Create a float input called "pond" with a default value of 0.20. The input title is "Float", and the minimum value is 0.10, the maximum value is 1, and the step is 0.10.
Create an integer input called "linewidth_feature" with a default value of 1. The input title is "Integer", and the minimum value is 1, the maximum value is 10, and the step is 1.
Plot the chart of the closing value with the color specified by the "color_indicator" input and the line width specified by the "linewidth_feature" input.
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.