Last active
January 3, 2018 09:49
-
-
Save KryptoGB/ebe716caf0e7970630ef67ccd12c2872 to your computer and use it in GitHub Desktop.
Krypto's "DOUBLE_UP" Exploit for Stepgain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are reading this right now you probably know that Gunbots "DOUBLE_UP" averaging feature currently doesn't work with Stepgain. | |
This exploit uses MIN_VOLUME_TO_SELL as a workaround to get a single "DOUBLE_UP" while using the Stepgain strategy. | |
This has only been tested on 5.0.4 though it should apply to 4.0.5 as well. | |
While this should work for other strategies, I've not tested it personally. (edit: BB is Confirmed.) | |
Hit me up on Telegram in TheBotFather or Gunthy Elite channel if you can confirm/deny it working for other versions and strategies. | |
To get this working in your config we only need to mess with 2 variables "BTC_TRADING_LIMIT" and "MIN_VOLUME_TO_SELL" | |
"MIN_VOLUME_TO_SELL" is a setting that was implemented so gunbot would ignore dust (tiny leftover amounts) on the exchanges | |
By setting MIN_VOLUME_TO_SELL to X% below BTC_TRADING_LIMIT we can trick the bot into thinking this amount is dust and to execute a | |
"DOUBLE_UP" trend watcher when the pair drops below X% | |
In the following example our MIN_VOLUME_TO_SELL will be set to 10% less than our BTC_TRADING_LIMIT meaning that when | |
a pair loses 10% of it's value it will start a trend watcher to find another buy opportunity. | |
"BTC_TRADING_LIMIT": 0.0010, | |
"MIN_VOLUME_TO_SELL": 0.0009, | |
Results at 10% have been pretty good for most pairs. Feel free to tweak, test and share your results with me on Telegram | |
Be sure to change STOP_LIMIT setting to reflect this new "DOUBLE_UP" if you are running it on all your pairs. In the above example | |
we would want to set STOP_LIMIT to 11 or more to give the trend watcher room to work. | |
Did this tip help you? Send me beer money! BTC: 1Per7XsUsCUv4zWNPnrHUizDQX33XxVvKL | |
Or msg me on Telegram @KryptoGB if you want to tip me in any coin available at Bittrex. |
great work!
but is EMA1 +2 really a multiple of data samples and not of 5min candles??
"EMA1": 200, (last 200 samples (1h40m) of data to calculate EMA1)
"EMA2": 50, (last 50 samples (25m) for EMA2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Krypto's double up 'feature' in action:
BTC-DAR
3:05pm buys 0.02004998 worth of DAR @ 0.000175 (114.28571428 units)
Price continues to fall.
5:57pm buys another 0.02004998 worth of DAR @ 0.0015768 (126.83916793 units)
7:12pm sells 0.04384236 worth of DAR @ 0.00018228 (241.12488221 units)
Gross profit: 0.0037424
BUG!
7:19pm buys 0.02004998 worth of DAR @ 0.00019100 - WTF??
7:24pm manual sale of DAR @ 0.00019774
Gross profit: 0.00060401
So nice tidy little profit from the double up, and fortunately, from the double buy bug - Though I can assure you this would not have happened if i was not already looking at the coin for this very post when the bug happened. By the time I'd finished writing this post, DAR was back at 0.00019200 (Although at one point it did dip again to 0.00018712 or so, and yes, my bot did buy and sell again - but without a double buy of any sort :) )
So what would have happened if I had
"MIN_VOLUME_TO_BUY": 0.02,
"MIN_VOLUME_TO_SELL": 0.02
3:05pm buys 0.02004998 worth of DAR @ 0.000175 (114.28571428 units)
Price continues to fall.
7:12pm sells 0.02083199 worth of DAR @ 0.00018228
Gross profit: 0.00078201
So in all, the double buy feature/bug that Krypto found earnt me a tidy 0.00296039 profit, plus the 0.00060401 rescued from the other double buy bug means I'm off down the pub for a pint (or 3!)
Added some explanations of how I interpret the settings, and why ive set values as I have to help others understand how the ticker periods, and other things affect the charts.
Here is what I believe the chart my gunbot 'saw' looks like
https://s.tradingview.com/x/4bw31Mzo/