Taking profit using StochRSI

Ekliptor

Administrator
Staff member
When daytrading, you often you want to (partially) close profitable position at "the right moment" of the 1h (or 30min) chart before the market moves in the other direction again.

For this purpose WolfBot has a general purpose take profit strategy which you can add to any of your other trading strategies you are using.
This example will close 50% of a profitable long position on StochRSI high (respectively 50% of a profitable short position on StochRSI low).
Code:
"TakeProfitStochRSI": {
  "percentage": 50,
  "low": 11,
  "high": 87,
  "interval": 25,
  "optInFastK_Period": 5,
  "optInFastD_Period": 3,
  "optInFastD_MAType": 0,
  "closeRateFactor": 0.9992,
  "time": 300,
  "keepTrendOpen": true,
  "alwaysIncreaseStop": false,
  "ensureProfit": true,
  "minOpenTicks": 12,
  "candleSize": 60,
  "orderStrategy": "TriggerOrder",
  "pair": "USD_BTC",
  "enableLog": true
},
"TriggerOrder": {
  "candleSize": 1,
  "pair": "USD_BTC",
  "enableLog": true
}
To close the position completely just set "percentage" to "100".
You can read the full documentation of all parameters on the Configuration page of WolfBot - where you can also adjust them.
Notable parameters are:
  • alwaysIncreaseStop: This will make it a trailing stop. So once StochRSI high/low has been reached it will be updated on every candle tick regardless if the StochRSI is still above the high/low threshold.
  • time: For how many seconds price has cross the stop price, before the stop gets executed.

More simple solution such as placing a fixed or trailing stop at a profitable position are obviously also included in WolfBot, take a look at the strategies TakeProfitPartial and StopLossTurn for this.
 
Last edited: