From 9c29d4f45d4b034ae2d2a0eccbb831ac331aa30a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 27 Oct 2020 09:44:41 +0100 Subject: [PATCH] Update OrdersSimulations.js --- TaskServer/LowFrequencyTrading/OrdersSimulations.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TaskServer/LowFrequencyTrading/OrdersSimulations.js b/TaskServer/LowFrequencyTrading/OrdersSimulations.js index 521bfb127..435f4cd98 100644 --- a/TaskServer/LowFrequencyTrading/OrdersSimulations.js +++ b/TaskServer/LowFrequencyTrading/OrdersSimulations.js @@ -64,8 +64,14 @@ exports.newOrdersSimulations = function newOrdersSimulations(bot, logger) { function basedOnSessionParameters() { /* The default way to calculate the Actual Rate is to apply the Slippage defined - at the Session Parameters Definition. + at the Session Parameters Definition. We are not going to apply the default if there + is a definition for this order on how to calculate the actual rate. */ + if (tradingSystemOrder.simulatedExchangeEvents !== undefined) { + if (tradingSystemOrder.simulatedExchangeEvents.simulatedActualRate !== undefined) { + return + } + } switch (tradingEngineOrder.type) { case 'Market Order': { /*