mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
Deployed 12560e9
to develop in en with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
b18c835d8b
commit
b1f9d4c666
File diff suppressed because one or more lines are too long
|
@ -2408,7 +2408,8 @@ This can be used to perform calculations which are pair independent (apply to al
|
|||
<h2 id="custom-stoploss">Custom stoploss<a class="headerlink" href="#custom-stoploss" title="Permanent link">¶</a></h2>
|
||||
<p>Called for open trade every iteration (roughly every 5 seconds) until a trade is closed.</p>
|
||||
<p>The usage of the custom stoploss method must be enabled by setting <code>use_custom_stoploss=True</code> on the strategy object.</p>
|
||||
<p>The stoploss price can only ever move upwards - if the stoploss value returned from <code>custom_stoploss</code> would result in a lower stoploss price than was previously set, it will be ignored. The traditional <code>stoploss</code> value serves as an absolute lower level and will be instated as the initial stoploss (before this method is called for the first time for a trade), and is still mandatory.</p>
|
||||
<p>The stoploss price can only ever move upwards - if the stoploss value returned from <code>custom_stoploss</code> would result in a lower stoploss price than was previously set, it will be ignored. The traditional <code>stoploss</code> value serves as an absolute lower level and will be instated as the initial stoploss (before this method is called for the first time for a trade), and is still mandatory.<br />
|
||||
As custom stoploss acts as regular, changing stoploss, it will behave similar to <code>trailing_stop</code> - and trades exiting due to this will have the exit_reason of <code>"trailing_stop_loss"</code>.</p>
|
||||
<p>The method must return a stoploss value (float / number) as a percentage of the current price.
|
||||
E.g. If the <code>current_rate</code> is 200 USD, then returning <code>0.02</code> will set the stoploss price 2% lower, at 196 USD.
|
||||
During backtesting, <code>current_rate</code> (and <code>current_profit</code>) are provided against the candle's high (or low for short trades) - while the resulting stoploss is evaluated against the candle's low (or high for short trades).</p>
|
||||
|
|
Loading…
Reference in New Issue
Block a user