hello, I have read this following on a series of posts,
"
System.Timers.Timer uses ThreadPool threads. Please avoid using System.Timers.Timer because while you are accessing cAlgo.API objects from timer's thread, cAlgo could decide to update such objects from another thread. In such case there is a possibility that data will be corrupted and entire application could fail.
We are going to implement cAlgo.API.Timer which will guarantee that only one thread works with API objects per time."
Im currently trying to program a bot that will allow for the closing of a position if its over a specific profit level for a period of time, Is the cAlgo.API.Timer in the works? If not, what is suggested to be used alternatively??
Computer time/ System time is irrelevant, as this is more or less a stop watch, all I would need the function to do is ensure that the appropriate interval for a second is calculated on each and every order... if you have have any recommendations I would really appreciate any direction on the matter and if there is a means within the API.
akent813
09 Jun 2014, 21:52
hello, I have read this following on a series of posts,
"
System.Timers.Timer uses ThreadPool threads. Please avoid using System.Timers.Timer because while you are accessing cAlgo.API objects from timer's thread, cAlgo could decide to update such objects from another thread. In such case there is a possibility that data will be corrupted and entire application could fail.
We are going to implement cAlgo.API.Timer which will guarantee that only one thread works with API objects per time."
Im currently trying to program a bot that will allow for the closing of a position if its over a specific profit level for a period of time, Is the cAlgo.API.Timer in the works? If not, what is suggested to be used alternatively??
Computer time/ System time is irrelevant, as this is more or less a stop watch, all I would need the function to do is ensure that the appropriate interval for a second is calculated on each and every order... if you have have any recommendations I would really appreciate any direction on the matter and if there is a means within the API.
--Andrew
@akent813