OPEN-SOURCE SCRIPT

Honest Volatility Grid [Honestcowboy]

Aktualisiert
The Honest Volatility Grid is an attempt at creating a robust grid trading strategy but without standard levels.
Normal grid systems use price levels like 1.01;1.02;1.03;1.04... and place an order at each of these levels. In this program instead we create a grid using keltner channels using a long term moving average.

🟦 IS THIS EVEN USEFUL?

The idea is to have a more fluid style of trading where levels expand and follow price and do not stick to precreated levels. This however also makes each closed trade different instead of using fixed take profit levels. In this strategy a take profit level can even be a loss. It is useful as a strategy because it works in a different way than most strategies, making it a good tool to diversify a portfolio of trading strategies.

🟦 STRATEGY

There are 10 levels below the moving average and 10 above the moving average. For each side of the moving average the strategy uses 1 to 3 orders maximum (3 shorts at top, 3 longs at bottom). For instance you buy at level 2 below moving average and you increase position size when level 6 is reached (a cheaper price) in order to spread risks.

By default the strategy exits all trades when the moving average is reached, this makes it a mean reversion strategy. It is specifically designed for the forex market as these in my experience exhibit a lot of ranging behaviour on all the timeframes below daily.

There is also a stop loss at the outer band by default, in case price moves too far from the mean.

What are the risks?

In case price decides to stay below the moving average and never reaches the outer band one trade can create a very substantial loss, as the bands will keep following price and are not at a fixed level.

Explanation of default parameters

  • By default the strategy uses a starting capital of 25000$, this is realistic for retail traders.
  • Lot sizes at each level are set to minimum lot size 0.01, there is no reason for the default to be risky, if you want to risk more or increase equity curve increase the number at your own risk.
  • Slippage set to 20 points: that's a normal 2 pip slippage you will find on brokers.
  • Fill limit assumtion 20 points: so it takes 2 pips to confirm a fill, normal forex spread.
  • Commission is set to 0.00005 per contract: this means that for each contract traded there is a 5$ or whatever base currency pair has as commission. The number is set to 0.00005 because pinescript does not know that 1 contract is 100000 units. So we divide the number by 100000 to get a realistic commission.
  • The script will also multiply lot size by 100000 because pinescript does not know that lots are 100000 units in forex.


Extra safety limit

Normally the script uses strategy.exit() to exit trades at TP or SL. But because these are created 1 bar after a limit or stop order is filled in pinescript. There are strategy.orders set at the outer boundaries of the script to hedge against that risk. These get deleted bar after the first order is filled. Purely to counteract news bars or huge spikes in price messing up backtest.
Snapshot

🟦 VISUAL GOODIES

I've added a market profile feature to the edge of the grid. This so you can see in which grid zone market has been the most over X bars in the past. Some traders may wish to only turn on the strategy whenever the market profile displays specific characteristics (ranging market for instance).

These simply count how many times a high, low, or close price has been in each zone for X bars in the past. it's these purple boxes at the right side of the chart.
Snapshot

🟦 Script can be fully automated to MT5

There are risk settings in lot sizes or % for alerts and symbol settings provided at the bottom of the indicator. The script will send alert to MT5 broker trying to mimic the execution that happens on tradingview. There are always delays when using a bridge to MT5 broker and there could be errors so be mindful of that. This script sends alerts in format so they can be read by tradingview.to which is a bridge between the platforms.

Use the all alert function calls feature when setting up alerts and make sure you provide the right webhook if you want to use this approach.

Almost every setting in this indicator has a tooltip added to it. So if any setting is not clear hover over the (?) icon on the right of the setting.

Versionshinweise
The alerts where not using the same lot sizing as the tradingview strategy was. Updated them to use exact same lot sizing as the backtest and current trades on chart use. Better full automation now.
Bands and ChannelsMoving AveragesVolatility

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


✅ Let me help you become profitable long-term.
Patreon -> patreon.com/ChartMuse
Patreon -> patreon.com/ChartMuse
Auch am:

Haftungsausschluss