OPEN-SOURCE SCRIPT

Open = High or Open = Low

Updated
plain simple strategy of o=h or o=l generally if open is equal to high trend is bearish and if open is equal to low trend is bullish
Release Notes
Explanation of Updates:
EMA Calculation:
The script calculates a 9-period Exponential Moving Average (emaValue).
Sell Condition:
openEqualsHigh is true.
emaValue is below the previous candle's low (prevLow).
Buy Condition:
openEqualsLow is true.
emaValue is above the previous candle's high (prevHigh).
Signal Plot:
A green upward label (Buy) is plotted for buy signals.
A red downward label (Sell) is plotted for sell signals.
EMA Plot:
The 9-period EMA is plotted on the chart for reference.
Steps to Use:
Paste this code into the Pine Editor in TradingView.
Click Add to Chart.
The script will display buy and sell signals along with the 9-period EMA.
Chart patternsTrend Analysis

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer