bestnaf / ARS

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

Minimum Trailing Window #22

Open tr0lldermort opened 3 years ago

tr0lldermort commented 3 years ago

Description

When using oneScalper, EWO, or any other strat with ROE_SCALPER trailing enabled, the profit of the open position must exceed ROE (basic return) + ROE_LIMIT (trailing window size) before it is possible for the position to close. This forces the user to trade off between two options:

  1. Have a small trailing window that cannot trail successfully but will allow positions to close easily (low risk, low performance)
  2. Have a large trailing window that can successfully trail, but will decrease the chance of the position closing due to the extra ROE demand (high risk, high performance)

Functionality

A third option could be made available that achieves the best of both worlds. A paramater ROE_LIMIT_MIN is proposed, which will trigger a limit order at ROE once ROE + ROE_LIMIT_MIN has been reached. If the price pulls back by the size of ROE_LIMIT_MIN, the position will close out in profit as set by ROE. However, if the price continues in the profitable direction without hitting the limit order at ROE, it will reach ROE + ROE_LIMIT. The limit order is then cancelled, and normal closing behaviour is resumed.

This feature allows the user to utilise a large trailing window without having to increase the total required ROE (hence risk) to close out their position.

Example

<pair>.settings.ROE = 10 already exists <pair>.settings.ROE_LIMIT = 10 already exists <pair>.settings.ROE_LIMIT_MIN = 3 new

Normally, a position with ROE = 10 and ROE_LIMIT = 10 would have to reach an actual ROE of 20 before closing is possible. With this method, as soon as an actual ROE of 13 is reached, a limit order would be placed at ROE = 10. Then, the price of the asset can move freely between ROE = 10 and ROE = 20. If 20 is reached before 10 is hit, normal trailing functionality is restored with a nice wide window to improve overall profitability.