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精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明