update entry
This commit is contained in:
parent
c01cae412f
commit
a162c5fae6
1 changed files with 14 additions and 4 deletions
|
|
@ -243,13 +243,23 @@ export class IndicatorService {
|
|||
Number.MIN_SAFE_INTEGER
|
||||
);
|
||||
let entry = candles[0].close;
|
||||
if (side === "buy" && analysis.currentBB.upper < candles[0].close) {
|
||||
if (side === "buy") {
|
||||
if (analysis.currentBB.upper < candles[0].close && analysis.currentBB.upper > candles[0].open) {
|
||||
entry = analysis.currentBB.upper;
|
||||
}
|
||||
|
||||
if (side === "sell" && analysis.currentBB.lower > candles[0].close) {
|
||||
if (analysis.currentBB.lower < candles[0].close && analysis.currentBB.lower > candles[0].open) {
|
||||
entry = analysis.currentBB.lower;
|
||||
}
|
||||
}
|
||||
|
||||
if (side === "sell") {
|
||||
if (analysis.currentBB.lower > candles[0].close && analysis.currentBB.lower < candles[0].open) {
|
||||
entry = analysis.currentBB.lower;
|
||||
}
|
||||
if (analysis.currentBB.upper > candles[0].close && analysis.currentBB.upper < candles[0].open) {
|
||||
entry = analysis.currentBB.upper;
|
||||
}
|
||||
}
|
||||
|
||||
const order: Order = {
|
||||
symbol: analysis.symbol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue