Announcements at Phases when formula value changes

This commit is contained in:
Luis Fernando Molina committed 2019-10-21 11:03:30 +02:00
1 parent 50e20f38b7
commit a91f618d24
1 file changed
+14 -1
+14 -1
View File
@@ -1445,6 +1445,8 @@
if (phase !== undefined) {
if (phase.formula !== undefined) {
let previousValue = stopLoss
stopLoss = formulas.get(key)
if (processingDailyFiles) {
@@ -1452,7 +1454,11 @@
yesterday.stopLoss = stopLoss
}
}
}
if (stopLoss !== previousValue) {
checkAnnouncements(phase)
}
}
}
}
@@ -1568,12 +1574,19 @@
if (phase !== undefined) {
if (phase.formula !== undefined) {
let previousValue = stopLoss
takeProfit = formulas.get(key)
if (processingDailyFiles) {
if (positionedAtYesterday) {
yesterday.takeProfit = takeProfit
}
}
if (takeProfit !== previousValue) {
checkAnnouncements(phase)
}
}
}
}