PINE LIBRARY
Обновлено DrawIndicatorOnTheChart

Library "DrawIndicatorOnTheChart"
this library is used to show an indicator (such RSI, CCI, MOM etc) on the main chart with indicator's horizontal lines in a window. Location of the window is calculated dynamically by last price movemements
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
this library is used to show an indicator (such RSI, CCI, MOM etc) on the main chart with indicator's horizontal lines in a window. Location of the window is calculated dynamically by last price movemements
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
Информация о релизе
v2업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth, windowLabel)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
windowLabel (string): is the label of the window
Returns: none
Информация о релизе
v3Информация о релизе
v4Информация о релизе
v5업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth, padding)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
padding (float): is the padding in percentage between chart and indicator window
Returns: none
Информация о релизе
v6업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicator4, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth, padding)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicator4 (float): is fourth indicator you want to show
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
padding (float): is the padding in percentage between chart and indicator window
Returns: none
Информация о релизе
v7Информация о релизе
v8Информация о релизе
v9Информация о релизе
v10업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
Информация о релизе
v11Информация о релизе
v12Информация о релизе
v13Информация о релизе
v14Информация о релизе
v15Информация о релизе
v16Информация о релизе
v17Информация о релизе
v18Информация о релизе
v19업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
Parameters:
enabled (bool)
indicatorName (string)
indicator1 (float)
indicator2 (float)
indicator3 (float)
indicatorcolors (array<color>)
period (int)
indimax_ (float)
indimin_ (float)
levels (array<float>)
precision (int)
xlocation (int)
lnwidth (int)
Информация о релизе
v20Информация о релизе
v21업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
Информация о релизе
v22업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicator2, indicator3, indicatorcolors, period, indimax_, indimin_, levels, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicator2 (float): is second indicator you want to show, such -DI of DMI
indicator3 (float): is third indicator you want to show, such ADX of DMI
indicatorcolors (array<color>)
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
Информация о релизе
v23Информация о релизе
v24업데이트됨
drawIndicator(enabled, indicatorName, indicator1, indicatorcolor, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Parameters:
enabled (bool): if it's enabled to show
indicatorName (string): is the indicator name as string such "RSI", "CCI" etc
indicator1 (float): is first indicator you want to show, such rsi(close, 14), mom(close, 10) etc
indicatorcolor (color): is the color of indicator line
period (int): is the length of the window to show
indimax_ (float): is the maximum value of the indicator, for example for RSI it's 100.0, if the indicator (such CCI, MOM etc) doesn't have maximum value then use "na"
indimin_ (float): is the minimum value of the indicator, for example for RSI it's 0.0, if the indicator (such CCI, MOM etc)doesn't have maximum value then use "na"
levels (array<float>): is the levels of the array for the horizontal lines. for example if you want horizontal lines at 30.0, and 70.0 then use array.from(30.0, 70.0). if no horizontal lines then use array.from(na)
precision (int): is the precision/nuber of decimals that is used to show indicator values, for example for RSI set it 2
xlocation (int): is end location of the indicator window, for example if xlocation = 0 window is created on the index of the last bar/candle
lnwidth (int): is the line width of the indicator lines
Returns: none
Информация о релизе
v25Информация о релизе
v26더해짐
findIndiLoc()
getIndiLevel(indi, indimax, indimin, top, bottom)
Parameters:
indi (float)
indimax (float)
indimin (float)
top (float)
bottom (float)
findLowestTimeframe(timeframes)
Parameters:
timeframes (array<int>)
findLabelIndex(timeframes, lowestTimeframe)
Parameters:
timeframes (array<int>)
lowestTimeframe (int)
drawMultipleIndicators(enabled, title, windowNumber, indicatorValues, timeframes, indicatorColors, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
Parameters:
enabled (bool)
title (string)
windowNumber (int)
indicatorValues (array<float>)
timeframes (array<int>)
indicatorColors (array<color>)
period (int)
indimax_ (float)
indimin_ (float)
levels (array<float>)
precision (int)
xlocation (int)
lnwidth (int)
없어짐
drawIndicator(enabled, indicatorName, indicator1, indicatorcolor, period, indimax_, indimin_, levels, precision, xlocation, lnwidth)
draws the realted indicator on the chart
Информация о релизе
v27없어짐
findIndiLoc()
Информация о релизе
v28Библиотека Pine
В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли им воспользоваться. Вы можете использовать эту библиотеку в приватных или других публикациях с открытым исходным кодом, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Библиотека Pine
В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли им воспользоваться. Вы можете использовать эту библиотеку в приватных или других публикациях с открытым исходным кодом, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.