Clean version of BitcoinFib30
Works as is; with 6 % stop loss due to the addition of SAR as a condition 🙂
PS: Williams R% lenght 12 but backtest shows 13 is slightly better. Main time frame of 6 HOURS highly encouraged. This strategy has beat BTC gains for over 8 weeks and still going. Not good for alt-coin sets! Only for BTC!
April 7, 2022 at 3:28 AM #2960
April 7, 2022 at 4:33 PM #2961
April 8, 2022 at 3:46 AM #2966::
From a technical stand point this script is fine to use with leverage.
However, risk management is an ill studied subject. At the moment bitcoin is doing 5-10% intraday movements alts doing 10-50% intraday. If you lev 100x and your stop loss is of 1% you will get liquidated sooner than 1% bellow because of the minimum margin retention:
10x lev =
1% stop loss -> 10% loss of capital
5% stop loss -> 50% loss of capital
10% stop loss -> 100% loss of capital
This is not a market that is apt for leverage when intraday swings are this extreme. Personally, I think you want to stick to 1x right now and not give in to the temptation of leverage.
What concerns this specific script; you can see on the chart that the stop loss is 1-2% however, the conditions used in the script are “continuous”.
This means that if stop loss gets hit, it will immediately re-enter after it got hit and set another stop loss at 1-2% so you should really plan around the bottoms coming after the stop loss getting hit a couple of times. (Think 5 times or so. If it gets hit 5x at 1% and you are using leverage 2x that is still a 10% loss of capital! (You can win 1000000000000000% in profit but it just takes a 95% loss to get you liquidated!)
The way I mediated this is to use long time frame from 30 min+ (Sweet spot is 6 hours) since Haas will always wait for the next period even when using continuous indicators.
Personally; would not use leverage beyond 2x the returns on this script are insanely good without the risk of leverage; no need to get greedy when the market is this volatile.
Stay safe 🙂
April 8, 2022 at 3:49 AM #2967
April 8, 2022 at 3:57 AM #2968::
Last but not least. Keep in mind that when you short in futures your risk extreme goes from 0/infinity (1x long) to 100%(1x short) . You really don’t want to be shorting on leverage when the market is this volatile. (Funding fees can also eat up your equity and reduce that extreme dynamically)
April 25, 2022 at 2:23 AM #2991
April 25, 2022 at 3:54 AM #2992
April 29, 2022 at 4:40 AM #2996
April 29, 2022 at 3:09 PM #2997::
ok BTCfib30 is having mixed luck with being consistent in using its Stop Loss and Take profit orders… So its missing them at times… BTC/USD inverse perp was working ok at first took both a short position and exited with profit effectively then execeuted a long order and took up position correctly but then failed to Stop loss and went far beyond its percentage setting. Funny thing in the log when it executed the short it returned a single balance error checking the contract size trying to complete the order and take position then somehow corrected and that 1st order was completed without fuss and it went back to work but failed to act on SL as described above. When I get that contract balance error any other times it repeats unable to read the correct order balance and that order vanishes from the servers orders and positions tab but is still visible on exchange… the bot can’t return to work while it can’t read the contracts balance correctly and order can’t be cancelled from positions tab because it not visible so it has to be cancelled manually on exchange, now bot is unable to show statistics because the only way to get it to work again is clean the bot and stop it trying to remove an order that isn’t there any longer, turn it off and restart it. This has happened on a few different pairs a couple of times… With ether it wouldn’t take profits and kept enlarging the TP trigger much higher than settings dictated it should and I had to manually do it from exchange… but then the order was out of postion for the bot and unable to reconcile itself so again turned of cleaned and restarted, only difference with ETH was order was still visible in positions tab until removed on exchange and not given a balance error. I’m getting a lot of disconnects from the websocket with this error repeating every couple hours with the bots active
29-04-2022 14:38:58 |ERROR| WebSocketSharp.WebSocketException: The header of a frame cannot be read from the stream.
at WebSocketSharp.WebSocketFrame.processHeader(Byte header)
at WebSocketSharp.WebSocketFrame.<>c__DisplayClassa.<readHeaderAsync>b__9(Byte bytes)
at WebSocketSharp.Ext.<>c__DisplayClass9.<ReadBytesAsync>b__8(IAsyncResult ar)
29-04-2022 14:38:58 |ERROR| Connection to production.hcdn.ws.haasapi.com:80 has failed, retrying in 5 sec…