fix: reversal = take profit, not stop loss
HL→BG position: long HL, short BG. When bgP and hlP cross over (spread reverses): - Long HL: price went up → profit - Short BG: price went down → profit Both legs profit simultaneously. Reversal is MAX profit moment.
This commit is contained in:
@@ -457,7 +457,7 @@ func (t *Trader) checkExit(pos *ArbPosition, bgP, hlP, diffPct float64, notifier
|
|||||||
// Stop-loss: spread reversed (went negative)
|
// Stop-loss: spread reversed (went negative)
|
||||||
if diffPct < -0.02 {
|
if diffPct < -0.02 {
|
||||||
shouldExit = true
|
shouldExit = true
|
||||||
exitReason = "价差反转,止损平仓"
|
exitReason = "价差反转,止盈平仓"
|
||||||
}
|
}
|
||||||
|
|
||||||
if elapsed > 30*time.Minute {
|
if elapsed > 30*time.Minute {
|
||||||
|
|||||||
Reference in New Issue
Block a user