Skip to main contentStop Loss Calculation
::: info
Cette page est générée automatiquement à partir d’une spécification Gauge.
Source: specs/stoploss.spec
:::
Calculate Stop Loss for Long Position
- Given position type “LONG”
- And entry price “100”
- And current price “110”
- And stop loss percentage “10”
- When calculating stop loss
- Then stop loss should be “90”
Calculate Stop Loss for Short Position
- Given position type “SHORT”
- And entry price “100”
- And current price “90”
- And stop loss percentage “10”
- When calculating stop loss
- Then stop loss should be “110”
Calculate Stop Loss with Trailing Stop for Long
- Given position type “LONG”
- And entry price “100”
- And current price “120”
- And stop loss percentage “10”
- And trailing stop enabled
- When calculating stop loss
- Then stop loss should be “108”
Calculate Stop Loss with Trailing Stop for Short
- Given position type “SHORT”
- And entry price “100”
- And current price “80”
- And stop loss percentage “10”
- And trailing stop enabled
- When calculating stop loss
- Then stop loss should be “88”
Stop Loss Should Not Move Against Position
- Given position type “LONG”
- And entry price “100”
- And current price “90”
- And stop loss percentage “10”
- And trailing stop enabled
- When calculating stop loss
- Then stop loss should be “90”