Login Page - Create Account

Support Board


Date/Time: Fri, 10 May 2024 06:57:19 +0000



Post From: TCP/IP Server in custom study

[2021-06-04 09:26:49]
User310645 - Posts: 49
I don't know which code block you tried or what the rest of the code looks like, but a couple of things;
1) SC makes several calls into your study so you need to make sure you initialise with the correct SCStudyInterfaceRef ie. outside of the sc.SetDefaults
2) You will need to manage any objects created yourself either in persistent pointers or static variables
3) There seems to be issues calling some study ref methods (ie. they get ignored) when the study itself isn't being called by the main SC loop. You will have to work out your own synchronisation for those.

I've attached a working study which simply creates a thread which logs the last price to a file every 5 seconds.HTH.
Compiled with VS Community 2019 16.8.6
attachmentThread.cpp - Attached On 2021-06-04 09:05:26 UTC - Size: 1.68 KB - 245 views