update
This commit is contained in:
parent
a43f4b77dc
commit
16509df683
1 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ export const eventHandlerFuture: EventHandler = {
|
||||||
});
|
});
|
||||||
if (positions.length > 0) {
|
if (positions.length > 0) {
|
||||||
const position = positions[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);
|
const halfSize = (Number(position.size) / 2).toFixed(2);
|
||||||
await bybitService.submitOrder({
|
await bybitService.submitOrder({
|
||||||
category: "linear",
|
category: "linear",
|
||||||
|
|
@ -83,7 +83,7 @@ export const eventHandlerFuture: EventHandler = {
|
||||||
});
|
});
|
||||||
sendMessage(`Future Căt nửa ${analysis.symbol} ${analysis.interval}M ${analysis.currentBB.upper} ${halfSize}`);
|
sendMessage(`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);
|
const halfSize = (Number(position.size) / 2).toFixed(2);
|
||||||
await bybitService.submitOrder({
|
await bybitService.submitOrder({
|
||||||
category: "linear",
|
category: "linear",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue