Support Board
Date/Time: Wed, 05 Mar 2025 18:25:01 +0000
[Programming Help] - Making http requests in an automated trading study during backtesting
View Count: 772
[2022-01-10 23:14:43] |
glacialspring - Posts: 26 |
I am sending some data from sierra chart for each bar to my server that returns whether to buy or sell, and I was wondering how sc.MakeHTTPPOSTRequest is handled in backtesting. I see that the response is handled asynchronously on the next study call(s) as the response is received. I'm not using autolooping for the study and I think I can get around potential problems by sending a bar index along with the server request and including it in the returned response, but I'm worried that the first sc.HTTPResponse will already have been overwritten because the replay is going so fast. Is it possible that the responses could be overwritten by subsequent requests?
|
[2022-01-11 15:15:36] |
1+1=10 - Posts: 270 |
The HTTP protocol is built on top of the TCP protocol. The TCP protocol ensures all data packets get to the destination, even if it requires resending packets. At the receiving end the responses will be stored until your server does something with them. You can read about TCP here: https://www.fortinet.com/resources/cyberglossary/tcp-ip Good luck! |
[2022-01-11 15:24:10] |
glacialspring - Posts: 26 |
Hi Gilbert thanks for the reply. My question was about sierra chart's specific http request handling design as the response is written into what looks to be like a singleton buffer that could possibly be overwritten when a new response is received.
|
[2022-01-11 15:49:47] |
1+1=10 - Posts: 270 |
Got it. Why not use a ACSIL persistent variable to keep a total of requests and compare it to a total of responses on the server end?
|
[2022-01-12 18:50:50] |
glacialspring - Posts: 26 |
Hopefully Sierra Chart Engineering can weigh in on my specific question.
|
To post a message in this thread, you need to log in with your Sierra Chart account: