OPEN-SOURCE SCRIPT

Anchor Buy Sell Levels

645
Daily Validity:
The indicator generates a single horizontal line (either a Buy Level or a Sell Level) that remains valid throughout the entire trading day.

Source of the Signal:
The level (buy or sell) is determined using candles that were generated before the day in question.

Selection Logic:
When determining the level, the indicator checks past candles in descending order (from the most recent backward).

The very first candle encountered that meets the respective logic (either the buy or sell condition) sets the level.
Buy and Sell Logic:

Buy Signal: Generated when a candle’s close is lower than both the previous candle’s close and the next candle’s close (i.e., a local minimum). The Buy Level is drawn at the low of that qualifying candle.
Sell Signal: Generated when a candle’s close is higher than both the previous candle’s close and the next candle’s close (i.e., a local maximum). The Sell Level is drawn at the high of that qualifying candle.
One Signal per Day:
For any given day, the indicator will display either a Buy Level or a Sell Level—not both. The decision is based on which qualifying candle (and its corresponding condition) is found first when scanning the historical data in descending order.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.