update
This commit is contained in:
parent
a162c5fae6
commit
2bcda92196
1 changed files with 5 additions and 5 deletions
|
|
@ -36,7 +36,7 @@ export class IndicatorService {
|
||||||
}
|
}
|
||||||
let close = candles.map((c) => c.close);
|
let close = candles.map((c) => c.close);
|
||||||
const ema34 = EMA.calculate({
|
const ema34 = EMA.calculate({
|
||||||
period: 34,
|
period: 20,
|
||||||
values: close,
|
values: close,
|
||||||
reversedInput: true,
|
reversedInput: true,
|
||||||
});
|
});
|
||||||
|
|
@ -244,19 +244,19 @@ export class IndicatorService {
|
||||||
);
|
);
|
||||||
let entry = candles[0].close;
|
let entry = candles[0].close;
|
||||||
if (side === "buy") {
|
if (side === "buy") {
|
||||||
if (analysis.currentBB.upper < candles[0].close && analysis.currentBB.upper > candles[0].open) {
|
if (analysis.currentBB.upper < Math.max(candles[0].close, candles[0].open)) {
|
||||||
entry = analysis.currentBB.upper;
|
entry = analysis.currentBB.upper;
|
||||||
}
|
}
|
||||||
if (analysis.currentBB.lower < candles[0].close && analysis.currentBB.lower > candles[0].open) {
|
if (analysis.currentBB.lower < candles[0].open && analysis.currentBB.lower > candles[0].close) {
|
||||||
entry = analysis.currentBB.lower;
|
entry = analysis.currentBB.lower;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (side === "sell") {
|
if (side === "sell") {
|
||||||
if (analysis.currentBB.lower > candles[0].close && analysis.currentBB.lower < candles[0].open) {
|
if (analysis.currentBB.lower > Math.min(candles[0].close, candles[0].open)) {
|
||||||
entry = analysis.currentBB.lower;
|
entry = analysis.currentBB.lower;
|
||||||
}
|
}
|
||||||
if (analysis.currentBB.upper > candles[0].close && analysis.currentBB.upper < candles[0].open) {
|
if (analysis.currentBB.upper > candles[0].open && analysis.currentBB.upper < candles[0].close) {
|
||||||
entry = analysis.currentBB.upper;
|
entry = analysis.currentBB.upper;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue