Resolution Input
Yaser Rahmati | یاسر رحمتی
Last updated
Yaser Rahmati | یاسر رحمتی
Last updated
This script is an indicator that plots the closing price of a security on the chart. The user can select the timeframe resolution (daily, weekly, or monthly) through the indicator's settings. The default resolution is daily ('D').
Specifies that the script is using Pine Script version 5.
Defines the script as an indicator named "Input Resolution". This name will appear on the chart when you add this script as an indicator.
input.timeframe
is a function that creates a dropdown list in the indicator settings.
defval = 'D'
sets the default value of this dropdown to 'D', which typically stands for daily timeframe.
title = "Select Resolution"
is the label that appears next to the dropdown in the indicator settings.
options=['D', 'W', 'M']
specifies the options available in the dropdown: 'D' for daily, 'W' for weekly, and 'M' for monthly.
The result of this line is that the user can select a timeframe resolution (daily, weekly, or monthly) in the indicator settings, and this value is stored in the variable resolution
.
plot(close)
plots the closing price of the asset on the chart.
pine script
, trading view
, script editor
, indicators
, strategies
, backtesting
, alerts
, custom scripts
, stock analysis
, charting tools
, technical analysis
, built-in functions
, pine script syntax
, trading bots
, automated trading
, scripting language
, market data
, trading signals
, financial markets
, programming trading strategies
, یاسر رحمتی