Support Board
Date/Time: Mon, 16 Jun 2025 09:21:39 +0000
Post From: SendOrdersToTradeService is not consistent with 'Trade >> Trade Simulation Mode On'
[2025-05-11 08:03:11] |
User61576 - Posts: 450 |
yes i have been getting the messages repeatedly for the chart but only for the time that they are in trade. Also my custom study has a variable to check if we are currently in trade or not, so it is not possible that orders are being sent continuously. i also checked the SendOrdersToTradeService documentation and i am following the instructions as they are given. in my sc.setdefaults, i have initialized production mode and set it as false. after sc.setdefaults, i have put "sc.SendOrdersToTradeService = ProductionMode.GetYesNo();" so, when i apply custom study and change it to yes, it should be checked every tick and value should be consistently 1. i added some print logs to see if value is getting changed during the trade and it was consistently 1. could this be a race condition of some sorts? charts not fully loading and my custom study file already applied? or should i not take input and just use "sc.SendOrdersToTradeService = !sc.GlobalTradeSimulationIsOn;" after sc.setdefaults? I completely forgot to mention that for the charts which i get this message, the trades are happening normally as they used to. it's just this message which keeps repeating in trade service log. So, in message log it showed "SendOrdersToTradeService value is 1", and at the same time in trade service log it shows 0 and global simulation mode on is also 0. so i feel it is race condition but please let me know what should I do in this case.
|