Price levels

699 просмотров
Thanks to the developers for adding arrays to TradingView. This gives you more freedom in Pine Script coding.

I have created an algorithm that draws support and resistance levels on a chart. The algorithm can be easily customized as you need.

This algorithm can help both intuitive and system traders. Intuitive traders just look at the drawn lines. For system traders, the "levels" array stores all level values. Thus, you can use these values ​​for algorithmic trading.
Информация о релизе: Now you can set the number of historical bars to search for a level. This will avoid getting random levels. Also, you can set a limit on the number of lines on the chart. The old levels will be deleted and will not bother you.

It should be noted that this algorithm is difficult to use on small timeframes due to the limited capabilities of the Pine Script. We can reference a maximum of 5000 historical bars in cycles. Also, the script may receive an error due to a long calculation. Therefore, do not ask too much of the algorithm on small timeframes.
Информация о релизе: Now you can graphically customize your indicator.
Информация о релизе: Fixed a small bug in the variable title.
Информация о релизе: made the code look nice!
Информация о релизе: made the code look nice!
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Хотите использовать этот скрипт на графике?


excellent script for array application! thanks for sharing !
+1 Ответить
kitoboynaya blackcat1402
@blackcat1402, Thank. It's good that arrays were added in Pine Script!
Thanks for this script @kitoboynaya. Question: what does it mean when no line appear in a (stock) chart ? How to better adjust its sensitivity? Cheers
@MasBart, You are welcome. Read the comments above the variables. I commented everything. And see how it works on a monthly timeframe, where there are few candles and it's easy to figure it out.
Looks slick dude
Домой Скринер акций Скринер форекс Скринер криптовалют Экономический календарь О проекте Особенности Цены Приведи друга Правила поведения Справочный центр Решения для сайтов и брокеров Виджеты Графики TradingView для сайтов Легкая версия графиков Блог и новости Твиттер
Профиль Настройка профиля Счёт и оплата Ваши друзья Монеты Мои запросы в поддержку Справочный центр Личные сообщения Чат Выйти