PROTECTED SOURCE SCRIPT

Futures Spot Difference Strategy by MoonFlag


This strategy compares the spot and futures value of a coin on a given exchange
If the 'Percent Difference' (See settings) is greater than a user specified ammount a blue (long) or green(short) line is put on the chart.
Default % difference typically varies from 0.2 to 0.7 depending on the coin and timeframe. On higher timeframes (1hour) a difference of 1.5% might be required to give good intermittent trade results.

I've chosen a USD-USDT comparison as default for ease of understanding. Note the futures coin goes onto the chart and the spot coin is referenced in settings. The bot works this way as the futures will typically extend beyond the spot price, not the other way around.

User can select if to include Long and/or Short trades.

The 'Trigger Only When Bar Complete' means that repainting should not be an issue if set to true. However, if set to false the strategy will enter a trade at the point in time when the percentage difference is met. This is useful with some coins as the futures coins price rapidly changes to realign with the spot price. It is however difficult to backtest this feature as backtests only consider the bar complete situation. I mostly use Trigger When Bar Complete = true, as a difference in the spot/ futures price is typically followed by a price shift trend over then next reasonable time period.

Timing is essential in this bot. There is a stop-loss however, this stop value is replaced by a exp ramp which has 3 variables (starting %, length, run-up). When the ramp is narrower to the price than the stop-loss the ramp takes over the stop-loss and this reduces losses. Also, there is an option to have the ramp take over the take-profit if the ramp betters the start-price (i.e. the trade is in profit). This is very useful for times when the price massively swings beyond the take-profit price as the exp ramp goes way up. The ramp also limits the time a trade will stay in position, unless the trades moves in tandem with the ramp. The ramp is the most useful feature I have for bots, I use it all the time.

So a difference between the spot and futures price - can lead to a trend establishing, so catch these with this bot. It works well on fast timeframes, 1m, 5m, 15m, and also is useful with the 1hour and similar.

Please get in touch to have this bot matched to any coin pair

Please do get in touch if you have any questions/suggestions.

Sincerely,
MoonFlag PhD
differencefuturesspotVolatility

Skrypt chroniony

Ten skrypt został opublikowany z zamkniętym kodem źródłowym i możesz z niego dowolnie korzystać. Możesz go dodać do ulubionych, żeby używać go na wykresie. Nie możesz przeglądać ani modyfikować jego kodu źródłowego.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności