mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 23:07:01 +08:00
fix: use strategy config for position value ratio validation instead of hardcoded 1.5x
This commit is contained in:
@@ -83,7 +83,8 @@ func TestLeverageFallback(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
err := validateDecision(&tt.decision, tt.accountEquity, tt.btcEthLeverage, tt.altcoinLeverage)
|
||||
// Use default position value ratios for testing (10x for BTC/ETH, 1.5x for altcoins)
|
||||
err := validateDecision(&tt.decision, tt.accountEquity, tt.btcEthLeverage, tt.altcoinLeverage, 10.0, 1.5)
|
||||
|
||||
// Check error status
|
||||
if (err != nil) != tt.wantError {
|
||||
|
||||
Reference in New Issue
Block a user