Compare commits

..

2 commits

Author SHA1 Message Date
KienVT9
272ba19977 Merge branch 'main' of http://192.168.1.16:3210/administrator/ai-trading-sys 2025-07-18 10:07:11 +07:00
KienVT9
16509df683 update 2025-07-18 10:07:08 +07:00

View file

@ -74,7 +74,7 @@ export const eventHandlerFuture: EventHandler = {
});
if (positions.length > 0) {
const position = positions[0];
if (position.side === "Buy" && analysis.isOverBbUpper) {
if (position.side === "Buy" && analysis.isOverBbUpper && candle.close > candle.open) {
const halfSize = (Number(position.size) / 2).toFixed(2);
await bybitService.submitOrder({
category: "linear",
@ -91,7 +91,7 @@ export const eventHandlerFuture: EventHandler = {
`Future Căt nửa ${analysis.symbol} ${analysis.interval}M ${analysis.currentBB.upper} ${halfSize}`
);
}
if (position.side === "Sell" && analysis.isUnderBbLower) {
if (position.side === "Sell" && analysis.isUnderBbLower && candle.close < candle.open) {
const halfSize = (Number(position.size) / 2).toFixed(2);
await bybitService.submitOrder({
category: "linear",