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

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité