Trade Close Signal to Executor
This commit is contained in:
1 parent
2383729e1b
commit
616c5e39e4
1 file changed
+10
-2
+10
-2
@@ -1491,10 +1491,18 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
|
||||
if (type === '"Close@TakeProfit"' || type === '"Close@StopLoss"') {
|
||||
messageType = MESSAGE_TYPE.OrderUpdate;
|
||||
} else {
|
||||
messageType = MESSAGE_TYPE.OrderUpdate;
|
||||
messageType = MESSAGE_TYPE.OrderClose;
|
||||
}
|
||||
}
|
||||
|
||||
let exitOutcome = ""
|
||||
if (messageType === MESSAGE_TYPE.OrderClose && type === '"Close@TakeProfit"') {
|
||||
exitOutcome = "TP"
|
||||
}
|
||||
if (messageType === MESSAGE_TYPE.OrderClose && type === '"Close@TakeProfit"') {
|
||||
exitOutcome = "SL"
|
||||
}
|
||||
|
||||
executionMessage = createMessage(
|
||||
messageId,
|
||||
MESSAGE_ENTITY.SimulationEngine,
|
||||
@@ -1516,7 +1524,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) {
|
||||
-1,
|
||||
ORDER_STATUS.Signaled,
|
||||
0,
|
||||
"")
|
||||
exitOutcome)
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user