Fix Chart is not Defined
This commit is contained in:
1 parent
fe024c6338
commit
9ba95a5b33
3 files changed
+23
-6
No files matched your search
@@ -41,11 +41,7 @@ exports.newAnnouncements = function newAnnouncements(bot, logger) {
|
||||
if (canAnnounce === true) {
|
||||
let text = announcement.config.text
|
||||
if (announcement.formula !== undefined) {
|
||||
try {
|
||||
text = eval(announcement.formula.code)
|
||||
} catch (err) {
|
||||
tradingSystem.errors.push([announcement.formula.id, err.message])
|
||||
}
|
||||
text = tradingSystem.formulas.get(announcement.formula.id)
|
||||
}
|
||||
|
||||
if (bot.SESSION.socialBots !== undefined) {
|
||||
|
||||
@@ -656,6 +656,14 @@ exports.newTradingSystem = function newTradingSystem(bot, logger, tradingEngineM
|
||||
evalConditions(manageStage, 'Manage Stage')
|
||||
evalFormulas(manageStage, 'Manage Stage')
|
||||
|
||||
if (
|
||||
tradingEngine.current.position.stopLoss.stopLossStage.value === 'Open Stage' ||
|
||||
tradingEngine.current.position.takeProfit.takeProfitStage.value === 'Open Stage') {
|
||||
let stageNode = tradingSystem.tradingStrategies[tradingEngine.current.strategy.index.value].openStage
|
||||
evalConditions(stageNode, 'Initial Definition')
|
||||
evalFormulas(stageNode, 'Initial Definition')
|
||||
}
|
||||
|
||||
/* Stop Loss Management */
|
||||
checkStopPhasesEvents()
|
||||
calculateStopLoss()
|
||||
|
||||
Reference in new issue
Block a user