Support Board
Date/Time: Mon, 25 Nov 2024 03:06:27 +0000
Post From: Simultaneous live/demo algo trading on one instance
[2024-04-10 12:55:37] |
emmanuel - Posts: 57 |
To elaborate on User61168's idea, if you squint at a pair of subgraphs, you can see a form of inter-process communication, all taking place within Sierra Chart. Let's say you have a parent study that needs to send a message to a child study. The parent study can create two hidden subgraphs: 1. A signaling subgraph. 2. A data subgraph. Together, these two subgraphs form a unidirectional communication channel. The signaling subgraph would contain a value which indicates the message that's being "sent.": enum SignalEnum {
NO_SIGNAL // This simply makes NO_SIGNAL equal to 0, the default signal. , INTENT_TO_TAKE_TRADE // This makes INTENT_TO_TAKE_TRADE equal to 1. , IGNORE_TRADE // ... }; For instance, if the parent study intents to take a given setup, it would write the "INTENT_TO_TAKE_TRADE" message (which is simply a specific number) to the signal subgraph and then write the bar number (the array index) of the bar where the trade setup is to the data subgraph. The price overlay study which User61168 mentioned would be used to copy these subgraphs to the child study so that the child study can "see" them. The same idea can be used in the opposite direction to have the child study send messages to the parent study. |