bestnaf / ARS

ARS addon for Gunbot MM
https://gunbot.ru
10 stars 2 forks source link

uPNL Killer #12

Closed tr0lldermort closed 3 years ago

tr0lldermort commented 3 years ago

Core Functionality

uPNL Killer is a safety feature that will guarantee bagged positions are nipped in the bud before accumulating a large -% of your wallet. This function does not rely on liquidation spread features and therefore has a speed advantage. Additionally, the trader may also preference “-% of wallet” to identify and eliminate early bags.

Unlike CAPITAL_RISK protection built into GB (which aims to protect your initial investment by using Wallet Balance : INITIAL_CAPITAL ratio to trigger reductions), uPNL Killer is designed to protect your entire wallet balance at all times. uPNLK trigger is set as a % of -uPNL for a specific coin pair, against your Wallet Balance – this means the behaviour of uPNL Killer is predictable and consistent.

Additional Safety Features

To complement the aggressive nature of uPNL killer, two additional safety features are built in which will prevent unnecessary and/or continually-repeating losses.

The first operates as follows: when uPNLK closes a position, uPNLK can automatically disable the coin pair. It is then up to the user to re-enable this pair if they want to.

The second safety feature takes into account the current liquidation spread of the open position. If for some reason Gunbot has opened a position that is unusually large, yet still has plenty of liquidation spread remaining (for example -uPNL is greater than 1% of wallet but liquidation spread has only dropped to 90%), the user might want to inhibit the action of uPNL killer until a certain LS limit has been reached. In this case, an additional inhibitive parameter is provided to prevent uPNLK from killing a position with lots of LS left.

Configuration Parameters

enable (True) / disable (False) protection <pair>.settings.uPNLK = True

Allow the coin pair to continue trading after the first pos kill (True) or kill the position immediately (False) <pair>.settings.uPNLK_RERUN = True

% unrealised loss limit (limited from -0.5% to -50.0%). More -uPNL than this causes uPNLK to kill position <pair>.settings.uPNLK_LIM = -1.5

% liquidation spread inhibitor (limited from 20% to 100%). If LS is above this limit, uPNLK will not close positions. If LS drops below this limit, uPNLK will operate nominally <pair>.settings.uPNLK_LS = 90

bestnaf commented 3 years ago

Will be released in v9.6.2 Options: PAIR.settings.uPNLK = True (default False) PAIR.settings.uPNLK_RERUN = True (if False - pair will be disabled after position close) PAIR.settings.uPNLK_LIM = -1.5 PAIR.settings.uPNLK_LS = 90