Gunbot Shop › Gunbot Forum › Javieralv
Gunbot v23.3.0_beta
– Fix some issues that caused pnl page to go blank and/or call max recursions limits.
– Possible fix for telegram NaN profit reports.
– Fix futures_gunthy and binance futures pnl calculations.
– Possible fix to pnl calculations in dashboard and pnl statistics.
Gunbot v23.2.9 Stable patch
https://gunbot.shop/gunbot-v23-2-9-download-and-changelogs/
Gunbot v23.2.8_beta
– ‘stepGridHedge: fix problem that prevented opening new short position when USE_TREND: true and no existing long position’
Gunbot v23.2.7_beta
– Fix parsing 1h and 4h candles for FTX.
Gunbot v23.2.5_beta
– Fx MEXC multiple pairs balance.
– Fake MEXC market orders as they do not support it.
Gunbot v23.2.4_beta
– Patching ccxt for MEXC.
Gunbot v23.2.3_beta
– StepGridHedge: add a case that allows opening a new short when trend is down and no long exists.
Gunbot v23.2.2_beta with experimental PNL calculation.
– Adds mexc to the GUI
Gunbot v23.2.1_beta with experimental PNL calculation.
– Enabled futures_gunthy for TV alerts (you have to use binance futures in tradingview charts and send alerts like SHORT_FUTURESGUNTHY_USDT-BAT_50 and so on)
– Fixes several issues in gui status screens.
Gunbot v23.2.0_beta with experimental PNL calculation
– run this rather on futures or spot markets and check gui > dashboard > Pnl and/or gui>dashboard per order pnl
– if you want to see new module debug logs set “DEBUG_PNL”: true in pair overrides or in strategy
– fix a nasty bug for ROE_SCALPER that would close shorts in weird conditions.
– If you are running ROE_SCALPER it is highly recommended to upgrade to this build.
– About new pnl module: if you notice weird results please send it us.
– This build includes a new partner exchange: MEXC.
– You can run it on spot markets for now.
Gunbot v23.1.8_beta
– enable SAFETY_TIMER for ROE_SPREAD. Thanks Q guys, feedback needed
– enable BUSD margined coins at binance futures and futures gunthy. Experimental.
– stepGridHedge: fix issue that prevented buy trailing when max buy count is reached.
– stepGridHybrid: apply TREND_BASIC on upper step when in no position. This will lead to some buys on upper step getting blocked when trend conditions are negative.
Gunbot v23.1.7_beta
– stepGridHybrid: fix duration of validity for some trend signals.
– stepGridHybrid: fix a case where partial sell used wrong volume, when below break even and buy count 1.
– stepGridHybid: fix case where partial sell left unreasonable amount of units worth less than mvts.
– autoconfig: Fix problem that broke adding pairs with filter rules in GUI.
– Add a trick from stepGridHedge to stepGridHybrid, preventing some useless dca when price is moving to a new range.
– Fix for theoretical problem in trend module.
– stepGridHedge: fix a situation where a partial sell trigger caused a full sell instead.
Gunbot v23.1.6_beta
– Fix some variables being overriden by core for custom Strat methods and SG families.
– Fix some beaxy and OKEx issues with trading history and balances fetching with websockets
– port some web sockets fixes from bitRage to Gunbot for binance, kucoin, kraken, huobi
– AutoConfig: allow removePairs job to work even if pair doesn’t cycle properly in Gunbot and balance data is not populated
– Fix reported errors in GUI texts.
– Some love to the navbar styling on mobile devices. Need feedback about all elements being completely visible or not, especially from fairly high res or low res devices
– Remove some unneeded logs in GUI
– New strategy: stepGridHybrid
A crossover between pure grid trading, TA trading and price action trading.
Some modes are meant to be used together with an AutoConfig controller script.
How does it work?
In it’s pure form, stepGridHybrid is basically like stepGrid with one difference: sell amounts are based on remaining buy volume below the current price.
This means that it is possible to skip buy steps (either intentionally or by accident), as soon as trading resumes at a lower level it will not attempt to sell units bought at higher rates unless the overall break even price is reached.
There are controls for setting percentage based step and trailing ranges.
There are options to use a built in trend module (using 4h, 1h and 15m candles) to influence trading behavior like:
– when it’s allowed to open a new trade
– place additional buy orders during a pump
– skip buy steps when price action is negative
– increase sell target and sell trailing range when price action is positive
better than stepGrid?
This is a silly question, what matters is how and when you use a tool. The strategy was made to offer more controls and different trading styles than possible in stepGrid. This alone does not make it a better strategy, but it does offer more settings options you can work with to tune the strategy.
What are ‘modes’?
There are five different modes available in this strategy, these govern when new trades may open and if/how a stop limit is used. When no mode is activated, new trades may always be opened. Modes are meant to be used one at a time (from opening to closing a trade), enabling multiple modes on a single pair can lead to unexpected behavior.
How to use stepGridHybrid?
There’s no strategy editor in the GUI for it yet, use the following pair overrides instead – and make sure to set your own value for trading limit:
“SELL_METHOD”: “stepGridHybrid”,
“BUY_METHOD”: “stepGridHybrid”,
“ATR_PERIOD”: 50,
“PERIOD”: 15,
“BUY_ENABLED”: true,
“SELL_ENABLED”: true,
“STOP_AFTER_SELL”: false,
“MIN_VOLUME_TO_SELL”: 10,
“MAX_BUY_COUNT”: 999,
“TRADING_LIMIT”: 100,
“USE_TLR”: false,
“AUTO_STEP_SIZE”: true,
“PCT_STEP_SIZE”: false,
“STEP_SIZE”: 2
“PCT_TRAILING_RANGE”: false,
“CUSTOM_TRAILING_RANGE”: 0.5
“USE_PSR”: true,
“PARTIAL_SELL_RATIO”: 0.4,
“TREND_SYNC”: false,
“TREND_BASIC”: true,
“TREND_PLUS”: true,
“TRAILING_MULTIPLIER”: 2,
“SELL_STEP_MULTIPLIER”: 1.2,
“CUSTOM_TRADING_RANGE_MODE”: false,
“TRADING_RANGE_LOW”: 8000,
“TRADING_RANGE_HIGH”: 10000,
“TRADING_RANGE_STOP”: 7000,
“PULLBACK_MODE”: false,
“VOLATILITY_MODE”: false,
“TA_MODE”: false,
“DYNAMIC_SL”: false,
The above set of overrides will make the strategy run with suggested default settings, without any brake on when it may open trades.
Settings descriptions for new or especially important settings
“ATR_PERIOD”: 50,
ATR_PERIOD is used for setting auto step size. Unlike regular stepGrid you can now safely experiment with lower values.
“PERIOD”: 15,
Strongly suggested to use PERIOD: 15
Using a different period will cause more API usage because the strategy will still fetch 15m candles for the trend module, next to 1h and 4h candles.
Exchange must support at least 15m, 1h and 4h for this strategy to work.
“TRADING_LIMIT”: 100,
“USE_TLR”: false,
When USE_TLR is enabled, the strategy will use a changing buy amount depending on if price is relatively high (lower amount) or relatively low (higher amount). If you use this, make sure to set a value for TRADING_LIMIT that is at least 4x the minimum trade size.
USE_TLR is meant to be used together with VOLATILITY_MODE, but can be used without it.
edited 13:36
“AUTO_STEP_SIZE”: true,
“PCT_STEP_SIZE”: false,
“STEP_SIZE”: 2
AUTO_STEP_SIZE uses ATR based steps.
When AUTO_STEP_SIZE is disabled, STEP_SIZE defines
the step size.
when PCT_STEP_SIZE is disabled, STEP_SIZE is set as an absolute price difference.
When PCT_STEP_SIZE is enabled, the value in STEP_SIZE represents a percentage. Setting 2 will lead to having steps of 2% of current price.
“PCT_TRAILING_RANGE”: false,
“CUSTOM_TRAILING_RANGE”: 0.5
By default, trailing ranges are set automatically based on the current distance between support and resistance.
With PCT_TRAILING_RANGE enabled, you can set a custom percentage in CUSTOM_TRAILING_RANGE to be used for buy and sell trailing. Setting 0.5 will lead to having trailing ranges of 0.5% of current price.
“USE_PSR”: true,
“PARTIAL_SELL_RATIO”: 0.4,
When placing a sell order below the overall break even rate, the sell volume is defined by PARTIAL_SELL_RATIO.
If for example 200 units were bought at rates lower than the current price, a PARTIAL_SELL_RATIO of 0.4 will lead to a partial sell order of 80 units.
When USE_PSR is enabled, the strategy sets partial sell ratio automatically. It will use a higher value when price is relatively low, and a lower value when price is relatively high.
“TREND_SYNC”: false,
When TREND_SYNC is enabled, new trades may only be opened when the trends on 4h and 15m are aligned.
This can be very restrictive.
“TREND_BASIC”: true,
This option enables dynamic strategy behavior like:
– using an increased sell step and trailing range when the market seems good for it
– placing immediate buy orders (regardless of hitting a step) when price action is very positive
– using higher partial sell ratio after an immediate buy
– skipping certain buy steps when price action is very negative
This option can be risky and needs testing. If you see unreasonable numbers of trades in a short time, please disable the option and report the behavior.
“TREND_PLUS”: true,
This option enables dynamic strategy behavior like:
– placing immediate buy orders (regardless of hitting a step) when there seems to be a short term opportunity
– using higher partial sell ratio after an immediate buy
This option can be risky and needs testing. If you see unreasonable numbers of trades in a short time, please disable the option and report the behavior.
“TRAILING_MULTIPLIER”: 2,
“SELL_STEP_MULTIPLIER”: 1.2,
These multipliers are used when TREND_BASIC or TREND_PLUS are enabled, and it detects a situation where increased targets make sense.
Setting TRAILING_MULTIPLIER: 2 multiplies the trailing range by 2.
Setting SELL_STEP_MULTIPLIER: 1.2 makes the a sell step 1.2x times as big.
Multipliers apply to both automatically or manually set step or trailing sizes.
“CUSTOM_TRADING_RANGE_MODE”: false,
“TRADING_RANGE_LOW”: 8000,
“TRADING_RANGE_HIGH”: 10000,
“TRADING_RANGE_STOP”: 7000,
With CUSTOM_TRADING_RANGE_MODE you can define the price zone in which you want the strategy to operate, and optionally set a stop target.
With the settings like in the example above, new trades may only be opened when price is between 8000 and 10000. In case price drops below 7000 all funds get sold. Set stop value to 0 to effectively disable it.
“PULLBACK_MODE”: false,
When enabled, a pair may only open new trades when a pullback happens (mostly on 4h charts).
“VOLATILITY_MODE”: false,
When enabled, only bullish pairs are traded in a controlled volatility range: it will attempt to start trading relatively low and stop trading when price is about to peak. This mode comes with a built in stop mechanism near the top to hopefully often allow for a clean exit with minimal loss on the last sell order (this stop mechanism is separated from the DYNAMIC_SL option, and cannot be disabled in this mode).
edited 13:36
“TA_MODE”: false,
When enabled, only bullish pairs are traded after they hit one or more TA fractals.
“DYNAMIC_SL”: false,
This option is meant to be used together with VOLATILITY_MODE or TA_MODE and tries to provide a meaningful stop target. You cannot see the stop target before it hits.
PULLBACK_MODE, VOLATILITY_MODE and TA_MODE are all very restrictive in terms of when new trades are allowed to be opened.
It can happen that you run a pair for weeks and nothing at all happens. These options are mostly meant to be used together with AutoConfig to feed the bot potential pairs on which one of these modes can be traded.
– stepgridHedge new setting: USE_TREND: true/false
gives the strategy the option to pick a side and manipulate tl, based on trend data gathered on 4h charts.
this overrules user settings for BUY_ENABLED and SELL_ENABLED
when it detects a phase where it trades long only:
– tl for longs are multiplied by 2
– shorts may only close, not dca
when it detects a phase where it trades short only:
– tl for shorts are multiplied by 2
– longs may only close, not dca
when it detects an undecided zone:
– both long and short use regular tl
– both sides may dca and close
during stronger trends, expect this mechanism to pause dca on the losing side for longer times – possible for many weeks
when false or omitted, strategy functions normally
Gunbot v23.1.4_beta
– Upgrade bittrex api to v3
– Port some kucoin and okex api call fixes from bitRage
– Add kraken pairs PHA OXY RAY.
– Possible fix to GUI crashing with newest browsers.
– stepGridHedge: add more controls for allowing certain orders types:
BUY_ENABLED: controls long orders
SELL_ENABLED: controls short orders
CLOSE_LONG_ENABLED: controls long close orders
CLOSE_SHORT_ENABLED: controls short close orders.
– stepGridHedge: add TRADING_LIMIT_SHORT option (just like TRADING_LIMIT, but only for the short side). Is an optional setting, when omitted TRADING_LIMIT is used for both side
– stepGridHedge: Add customizable settings to increase order amounts of the first x trades. If you 2 as multiplier value, it means that eligible orders get fired for tl * 2. In FIRST_TRADES_MULTIPLIER auto mode the behavior is that first trades size grows with the position size of the then losing side. Auto mode generates multiplier values between 1.5 and 5. The FIRST_TRADES_THRESHOLD option lets you set a position size threshold under which tl FIRST_TRADES_MULTIPLIER applies. In auto mode it will usually allow 2 to 3 trades with FIRST_TRADES_MULTIPLIER, and continues with 1x tl trades after that. When you set 10 as value, FIRST_TRADES_MULTIPLIER applies until the current position is 10 or more “howManyTL” (see console logs when unsure about this value). parameters: “FIRST_TRADES_MULTIPLIER”: “auto” or numeric value “FIRST_TRADES_THRESHOLD”: “auto” or numeric value.
– stepGridHedge: tuning conditions for first trades multiplier a bit.
Gunbot v23.1.2_beta
– Fix pipe error
– Implement stepGridHedge for bybit.
— Expected behavior:
The strategy uses the same order triggers as stepGrid does on spot, but in quite a different way.
Imagine stepGrid trading futures longs, when it encounters a sell step below the avg entry price (which would cause a loss on the long side), it will fire a trade on the short side. The same principle works on basically any situation stepGrid can encounter: it fires an order in the direction that is either profitable or does not cause a loss by firing the order.
Additionally, there are some none configurable methods that prevent dca orders to try to not accumulate too much too fast.
It gets more profitable once it had time to accumulate positions bigger than a few tl, which it will close in many parts – ever further away from avg entry. Long times of sideways trading are the main enemy of this strategy, because there is a risk of accumulating too much around similar prices.
How to configure pairs:
Set both the short and long pair like below, the short pair is only there to collect data and visualize trades. The settings for the short pair only make sure it never trades.
The long pair does the actual trading on both sides. Always make sure to have the short pair before the long pair.
There is no GUI strategy editor yet.
“pairs”: {
“bybit”: {
“USDT-ETH-SHORT”: {
“strategy”: “hedge”,
“enabled”: true,
“override”: {
“TRADING_LIMIT”: “0”,
“PERIOD”: “5”,
“MAX_BUY_COUNT”: “500”,
“BUY_ENABLED”: false,
“SELL_ENABLED”: false,
“BUY_METHOD”: “gain”,
“SELL_METHOD”: “gain”,
“LONG_LEVEL”: 100,
“SHORT_LEVEL”: 100,
“BUY_LEVEL”: 100,
“GAIN”: 100,
“ROE”: 100000,
“IS_MARGIN_STRAT”: true
}
},
“USDT-ETH-LONG”: {
“strategy”: “hedge”,
“enabled”: true,
“override”: {
“TRADING_LIMIT”: “45”,
“PERIOD”: “5”,
“MAX_BUY_COUNT”: 70,
“MAX_UNHEDGED”: 60,
“BUY_METHOD”: “stepGridHedge”,
“SELL_METHOD”: “stepGridHedge”,
“IS_MARGIN_STRAT”: true,
“STOP_AFTER_CLOSE_LONG”: false,
“STOP_AFTER_CLOSE_SHORT”: false
}
}
}
},
The settings above are something I use on a ~500 USDT test wallet with no other pairs active.
TRADING_LIMIT: in USDT, is the regular amount per initial or dca order, first few orders can sometimes use 1.5x or 2x this amount
MAX_BUY_COUNT: maximum position size (measured in ‘tl’) per side. Bot won’t add more to the position if this threshold is reached
MAX_UNHEDGED: max unhedged position size, the imbalance between long and short. For example if long is 20x tl and short is 5x tl, there is 15x tl unhedged. Bot won’t add more to the position if this threshold is reached
STOP_AFTER_CLOSE_LONG: when true, bot doesn’t open a new long after closing one
STOP_AFTER_CLOSE_SHORT: when true, bot doesn’t open a new short after closing one
Other stepGrid specific settings like manual step size also work, in exactly the same way as on stepGrid for spot trading.
There’s one caveat with order sizes on Bybit, the min order size is rather big and makes it hard to estimate how many tl a position currently is. For example if ETH is trading at 3000 and the min order size is 0.01 ETH in value, then a trading limit of 31 or 35 will both result in buying 0.01 eth.
This makes MAX_BUY_COUNT and MAX_UNHEDGED a bit imprecise when trading with a tl close to the minimum order size. You can see the current counts in the console logs.
About the pipe error: if you dont want to upgrade to this build and you are running a previous build you like and you get the error, do this:
>> Add to your etc/host the following line
23.111.175.138 api.etherscan.io