24 lines
593 B
Java
24 lines
593 B
Java
package com.quantai.trader.domain;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
public record TraderPricePlan(
|
|
BigDecimal entryPrice,
|
|
BigDecimal invalidPrice,
|
|
BigDecimal stopPrice,
|
|
BigDecimal targetPrice,
|
|
BigDecimal partialTakeProfitPrice,
|
|
long maxEntryWaitMs,
|
|
long maxHoldMs
|
|
) {
|
|
|
|
public boolean completeForEntry() {
|
|
return entryPrice != null
|
|
&& invalidPrice != null
|
|
&& stopPrice != null
|
|
&& targetPrice != null
|
|
&& maxEntryWaitMs > 0
|
|
&& maxHoldMs > 0;
|
|
}
|
|
}
|