I have built this trading bot that looks very profitable, at least backtesting, but it needs more optimizing so i thought id share it wiht the community in the hopes that together we can succeed better and faster
Tested on binance futures 1 min data on two sets, one from jan 1 00:00 to dec 31 23:55 2022 for a down year
the other set is from jan 1 00:00 to dec 31 23:55 for an up year
So far, it makes a bit of profit on the 2022 data (13.22%), whihc is far better than buy and hold (-59.14%). And it makes a lot more profit on the 2023 year (39.17%) vs buy and hold for that year (29.14%). the issue I cna see with it is it gets out of trades too early when the market is trending up, so if anyone can figure out a way to have it figure out the rtend and modify its strategy accordingly, it could potentiall make a lot more profits. Alternately, and/or creating its mirror strategy on the short side would work as well in tandem with it
since thre doesnt seem to be a way to share trading bots setups (only dca, grid and combo so far), here are the screenshots for it
these are the 10 pairs that i use (here too some are way more suited to this strategy than others and it cna be optimized as well)
Results for 2022 down year
Results for 2023 up year
margin setup
deal start setup
take profit setup
dca setup
Please post results on both 2022 and 2023 data and bot setup screenshots in here if you cna squeeze out better performance
We’re lazy
Please click on â‹® menu and press Share to copy the re-usable URL:
1 Like
Thank you so much for sharing the strategy and the configuration. I like it a lot.
First, I am looking currently at the exit conditions. Could you describe your logic here briefly? I am especially concerned with the “Close by timer” option, and I think it may be hurting the performance instead of improving it.
Without it it gets stuck in an open bad trade for weeks until the price comes back, losing out on good trades. You could get around it by having more than 1 open deal per pair but according to my backtesting, a timer is needed for maximum performance unless you can get around it by having a technical indicator that does the same thing, which is exit bad trades as early as possible, but not too early either lol
Ok, but you’re aware then that 9-hour rule overrides the Minimum take profit filter? At least the way how Gainium is working now, based on the backtest, as soon as the duration hits 9 hours, we’re exiting with a loss. So I think this needs to be tuned first. Maybe if we waited just one more hour, we would have had a profit.
i have tested 7-8-9-10 hours … 9 hrs is the sweet spot for maximum profits for this particular setup
As far as it overriding, thats fine, the 1.2 % minimum proft is more in regards to the take profit indicator and again its the sweet spot i have found works best so far
this bot i shared is optimized to the nearest 0.1% in terms of whats there already, but of course, if you add anything, or change the pairs it runs on, things will need to be optimized again
Yes, by default I wanted to experiment with other pairs…
But I do confirm that the way you optimized it appears to work well for the coins you have selected. I did a backtest for Dec, 2024 (1 month) on OKX Futures with 1x and 2x. Here are the results:
- https://app.gainium.io/bot/backtests?a=14&aid=share-backtest&backtestShare=1d7c56a6-3ecf-41b5-937f-e4b4d7ed90c9
- https://app.gainium.io/bot/backtests?a=14&aid=share-backtest&backtestShare=1fc59468-66c0-428c-94b6-14642aa7a8e4
I will continue to look at the bot from various angles and respond again.
1 Like
Here’s something to think about, generally speaking. If you trade on Futures, even with 1x, I would consider implementation of a Stop Loss. ( Alternatively, if you trade on Spot and don’t have a S/L, fine, you can become a community member for any of the bags you’re holding, it’s not the end of the world… )
Now, your strategy is already exiting with losses, but it has a good profit factor. I even did a 5x backtest now, and it was still very good and not liquidating, BUT I would not want to just “hope” that the account will not get liquidated during a different month. Especially as you put a large sum in it.
Hence I come back to a point of introducing a S/L to your strategy.
For example: https://app.gainium.io/bot/backtests?a=14&aid=share-backtest&backtestShare=8b1c1959-b877-4f4a-ade3-83d2622b3d59
Here, it’s 5x, with S/L = 20%:
Or, moving it to Spot.
1 Like
you are right, it needs a SL if implemented for real trading, however i was gonna add and optimize it last so it doesnt interfere with backtesting other indicators. but yes, around 20% seems to be where it should be, maybe a bit less, maybe a bit more
Im actually backtesting right now all the top 100 futures pairs on binance and will choose the top 10 most suited to this strategy
1 Like
Blockquote Yes, by default I wanted to experiment with other pairs…
But I do confirm that the way you optimized it appears to work well for the coins you have selected. I did a backtest for Dec, 2024 (1 month) on OKX Futures with 1x and 2x. Here are the results
it works well on a down trend, where it doesnt do so well imo is on uptrends where it fails to capture big jumps in price
Hey thanks for sharing the strategy.
One thing I would like to point out is that backtests doesn’t calculate funding fees. Trade durations are short but it’s something to keep in mind nonetheless.
Something I would do is refine more the entry. 0.5% increase in pice in 1m candle is relatively common, hence produces a lot of trades. In my experience there is a sweet spot for the trade frequency: Too little and it won’t have enough trades for statistical significance, too much and it could end up being very different from real trading (backtests are not perfect, there are assumptions on price movements inside the candle, the more trades done, and specially if they are short duration, the more chance that errors will accumulate).
Something I would do in this strategy is adding more filters for entry. For example market structure bullish, supertrend UP, or above a long term moving average.
Generally yes, but since this one has a relatively short duration timer then loses will be more or less contained.
1 Like
problem is, so far, every type of trend indicator i have tried applying has failed in yielding any sort of increased profits. on the contrary, the profits are greatly reduced
welcome to trading!
By the way, try to start your bot on your live account; I did try to start it up on OKX Futures earlier today and it failed; Mizar wasn’t giving much help about the error either:
So we need to solve this, in order to continue working on the strategy.
That looks like an exchange connection error on your side though
Hm, I think it’s something to do with bot’s logic. I finally see more info from another UI: Indicators error.
Will try another exchange. Will let you know. But try it as well, on some live account.
Increased profits is not the only metric you should be looking at. In fact I would argue that traders that focus solely on potential profit consistently lose money. That is because optimizing for profit will inevitably take more risk, and over enough time there will be a black swan event that will wipe out the account.
IMO one of the best metric one should focus is the sortino ratio. This ratio tells you the relationship between profit and risk. The higher the sortino ratio, the more profit potential with less risk. If strategy A has 10% return a month with a sortino of 1, and strategy B has 7% return a month with a sortino of 4, Strategy B is considered safer. If by taking a 3% reduction in profit you take 4x less risk, it’s totally worth it.
2 Likes
Thats very true. The sortino ratio with my 20 hand picked pairs is 612 for the 2023 bull run year. For 2022, the same exact pairs, i get a sortino ratio of 0.7. On average id say thats not too bad, but id be happy to at least throw a trend indicator in there that at least reduces the number of trades while keeping profits at a similar level. The fewer trades and the shorter the amount of time it stays into a trade, the smaller the risk of such an event taking place while the bot is in a position
However, thats also part of a separate risk management strategy beyond the scope of this bot.
1 Like
One issue I have noted with this in testing is that the s/l is often below the liquidation price. Is there an additional indicator that can ensure s/l triggers before liquidation?