OPEN-SOURCE SCRIPT

BarRange Strategy

Hello,

This is a long-only, volatility-based strategy that analyzes the range of the previous bar (high - low).

If the most recent bar’s range exceeds a threshold based on the last X bars, a trade is initiated.

You can customize the lookback period, threshold value, and exit type.

For exits, you can choose to exit after X bars or when the close price exceeds the previous bar’s high.

The strategy is designed for instruments with a long-term upward-sloping curves, such as ES1! or NQ1!. It may not perform well on other instruments.

Commissions are set to $2.50 per side ($5.00 per round trip).

Recommended timeframes are 1h and higher. With adjustments to the lookback period and threshold, it could potentially achieve similar results on lower timeframes as well.
statisticsVolatility

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明