OPEN-SOURCE SCRIPT

Break of High/Low with Volume, MACD, and MAs

How It Works:

Sessions:

The London session is defined between 8:00 and 16:00 UTC.
The New York session is defined between 13:00 and 21:00 UTC.

Previous High/Low:

The script identifies the highest high and lowest low from the previous bar using ta.highest(high, 1)[1] and ta.lowest(low, 1)[1].

Candle Body Size:

The script calculates the size of the current candle's body and checks if it is at least double the size of the previous candle's body.

Volume Check:

A high volume threshold is set as 1.5 times the 50-period SMA of the volume.

MACD Crossover:

The script calculates the MACD and its signal line and checks for bullish (buy) or bearish (sell) crossovers.

Signals:

A long signal (buy) is generated if the price breaks the previous high with a large body candle, high volume, and a bullish MACD crossover during the specified sessions.

A short signal (sell) is generated if the price breaks the previous low with a large body candle, high volume, and a bearish MACD crossover during the specified sessions.

Plotting:

The 50-period and 200-period moving averages, previous high, and previous low are plotted on the chart.

If a long condition is met, a "BUY" label is displayed below the bar. If a short condition is met, a "SELL" label is displayed above the bar.

Alerts:

Alerts are triggered whenever the conditions for a long or short trade are met.
Customization:

Feel free to adjust the session times, volume threshold, MACD settings, or moving averages based on your trading strategy or the specific asset you are trading.


Moving AveragesPine utilitiesVolume

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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

면책사항