TradingView
ahancock
4 Th12 2019 12:00

BitMEX pump catcher - MACD 

Bitcoin / US Dollar Perpetual Inverse Swap ContractBitMEX

Mô tả

This is a modified version of the BitMEX pump catcher by Jomy.

I have tweaked the algorithm to use the difference in MACD to get the correct direction of entries rather than using direction of candles which are not always indicative of trend direction. These changes increase net profit, profitable trades, while reducing drawdown.

Below is a copy and paste of Jomy's explanation of the algorithm.

What is going on here? This strategy is pretty simple. We start by measuring a very long chunk of volume history on BitMEX:XBTUSD 1 hour chart to find out if the current volume is high or low. At 1.0 the indicator is showing we are at 100% of normal historical volume . The blue line is a measure of recent volume! This indicator gets interested when the volume drops below 90% of the regular volume (0.9), and then comes back up over 90%. There's usually a pump of increased price activity during this time. When the 0.9 line is crossed by the blue line, the indicator surveys the last 2 bars of price action to figure out which way we're going, long or short. Green is long. Red is short. To exit the trade we use a 7 period fast ema of the volume crossing under an 11 ema slower period which shows declining interest in the market signifying an end to the pump or dump. The profit factor is quite high with 5x leverage, but historically we see 50% drawdown -- very risky. 1x leverage looks nice and tight with very low drawdown. Play with the inputs to see what matches your own risk profile. I would not recommend taking this into much lower timeframes as trading fees are not included in the profit calculations. Please don't get burned trading on stupid high leverage. This indicator is probably not going to work well on alts, as Bitcoin FOMO build up and behavior is different. This whole indicator is tuned to Bitcoin , and attempts to trade only the meatiest part of the market moves.

Jomy should get full credit to this indicator

Phát hành các Ghi chú

Increased Percent Profitable, Profit Factor, Net Profit, while reducing Max Drawdown as demonstrated in report.

Added configurable stop loss 10% works best and added logic to switch positions when signal changes.

Generally tidied up script code.

This strategy works best on BitMEX 1H candles.

Happy trading
Hancock
Bình luận
gi9opx
Actually by the time it catches the pump, it has already reversed. It has been impossible for me to get positive backtesting results on recent Bitmex data, until I tried a fast MACD setting that is higher than the slow MACD. Which means that the difference between the two will be negative, i.e. longs will trigger when the script was actually looking for shorts and vice versa.
ahancock
@Jomy I've gone ahead and included the changes here as i kept including errors in the code i was posting as comments. Hope this helps!
Jomy
@ahancock, happy to see you expanding on what started with just playing with code and a new idea. Good to see it gain in popularity here. I've altered my original code, but I haven't released it yet. I am working on a trailing stoploss version. Just testing it out for a little while longer to make sure it's robust before releasing it.
ahancock
@Jomy, I've written some code for trailing stop loss and dynamic trailing stop loss. i'll pm you the code encase you find it usefeul. I have already tested it on multiple scripts so should be robust. I'll jus tput the snippet together for you :)
UnknownUnicorn6629364
could please help me to put some code to see 2015~2020 instead of 2018~2020 ? how can i extend the period?

also i saw sometimes study one orders long and strategy one ordering short at the same time , they are ordering different positions even though settings are the same , do you know the reason ?

thanks in advance !
robertocrypto
Anyone knows how come that results prior to 2018 - so in 2016 and 2017 are much much worse, calculated on any exchange not just Bitmex? Is it because volume pattern changes thru time so strategy might work this year but next year it might not..?
ahancock
@robertocrypto, They aren't worse but over time each trade compounds. Meaning you have more leveraged equity as time goes on which is why you see an exponential report.
robertocrypto
@ahancock, Well I went back in time (via Bar replay) and from 2016 to 2017 with default settings I get 7,49% (63 closed trades). I believe if we could check only 2018 or 2019 we would get much better result even in just period of 12 months. Maybe Im doing something wrong?
ahancock
@robertocrypto, I'll look into that tomorrow and see if i can do some improvements. I'm not going to spend too much time on this indicator as im working on one with a derivative of the PVO indicator which gives far better entries and results. I will spend some time and look into what you've mentioned though. Thanks for pointing it out :)
robertocrypto
Whats the catch? Does this strategy repaint?
Thêm nữa