lirre8

Top/Bottom Detector

This indicator tries to detect tops and bottoms based on time and price. It counts candles using a simple criteria in both bullish and bearish directions. The count is added by 1 for each consecutive candle that matches this criteria. When a candle doesn't match the criteria the count is broken and will start over. A top or bottom is detected when the count reaches its maximum and is plotted on the chart as a red arrow (top) or a green arrow (bottom). Be aware that a top or bottom can be extended for several time periods and is broken only when the criteria no longer matches. Depending on your trading strategy, it can be advised to wait for the top/bottom to be broken before entering the trade.

How it works
The bullish count compares current candle with a candle X periods in the past. If the current candle price is higher than the past candle it matches and the count is added by 1. The bearish count works in the same way as the bullish count except that it matches if the current candle price is lower than the past candle instead of higher. The default parameters is to compare current candle close with the candle close 4 periods in the past, using a count of 9 as the maximum that detects a top or bottom. These values can all be adjusted in the settings.

Multi Timeframe Table
The multi timeframe table is visible by default in the top right corner. It gives some insight in what the count is for the current ticker in different timeframes. A bullish count will color the cell green and a bearish count red. Note that only timeframes higher or equal to what is used on the chart can be displayed. Any lower timeframes in the table will be grayed out and show the text N/A.

Alerts
Alerts can be setup when a bottom or top is detected. Using the "Any alert() function call" condition will alert both bottoms and tops.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?