Support Board
Date/Time: Thu, 31 Oct 2024 16:15:35 +0000
Post From: Flatten trades at specific time - Market Replay
[2024-05-29 19:39:02] |
emmanuel - Posts: 57 |
Yes, since you're using a pre-made study, you can use my code example to create a new ASCIL study (which you would compile) and then add the study to the same chart. This is not server-side code, so yes Sierra Chart needs to be running and the study needs to be on an open chart. The chart doesn't have to be visible; Meaning it can be minimized. When back-testing or doing a replay, Sierra Chart doesn't have to be connected for the study to work, since the trades are simulated locally. Obviously for real-time trading Sierra Chart would need to be connected. Regarding real-time trading, note that since this is client-side code, if you get disconnected from the Internet the study will not be able to function. The study doesn't use the computer's local time but rather the date-time of the bar. So if it doesn't receive market data, it won't do anything. It wouldn't be able to flatten trades anyway. Once reconnected to the Internet the study will "catch up" and start working. |