theEccentricTrader

Traffic Lights [theEccentricTrader]

theEccentricTrader 업데이트됨   
█  OVERVIEW


This indicator automatically draws higher timeframe support and resistance levels using current peak and trough prices. These prices are also displayed in a table which can be repositioned and resized at the user's discretion.


█  CONCEPTS


Green and Red Candles

• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.

Swing Highs and Swing Lows

• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.

Peak and Trough Prices (Basic)

• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.

Peak and Trough Prices (Advanced)

• The advanced peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the highest preceding green candle high price, depending on which is higher.
• The advanced trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the lowest preceding red candle low price, depending on which is lower.

Historic Peaks and Troughs

The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.

Range

The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.

Support and Resistance

• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.

Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.

It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.

Major Traffic Lights

Major traffic light levels are determined using monthly (red solid lines), weekly (orange solid lines) and daily (green solid lines) peak and trough prices.

Minor Traffic Lights

Minor traffic light levels are determined using 4H (red dashed lines), 1H (orange dashed lines) and 15-minute (green dashed lines) peak and trough prices.


█  FEATURES


Inputs

• Advanced Peak and Trough Price Logic
• Show Minor
• Show Major
• Extend Line Type
• Show Table
• Position
• Text Size

If the current timeframe is higher than any of the traffic light timeframes the relevant lines and table cells will automatically be hidden. As can be seen in Figure 1. below, the intraday lines and table cells will only appear if the user scales down to a low enough timeframe.


Figure 1.



█  LIMITATIONS


The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.

It is also worth mentioning that the minor levels will not be displayed if the user selects a custom timeframe between 31 and 44 minutes, and between 46 and 59. All other timeframes should work as intended.
릴리즈 노트:
Added missing inputs to table positioning options.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

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

차트에 이 스크립트를 사용하시겠습니까?