The Market State Block lets you check whether the market is currently in a particular state and outputs a Boolean value. For example, you can use the block to see if the market is open, close, or halted.
The following example uses the Market State Block to enable an Order Block only if the market is open.
Example Check market state before submitting an order.
The Market State Block should be used with the Ignore Market State option enabled. By default, this option is disabled and the algorithm will pause when any market reported by an Instrument Block in the algorithm is not in the Trading Session. However, since the Market State Block is used to design logic outside of the regular Trading Sessions, the usage of Market State Block will be rendered ineffective when the Ignore Market State option is disabled.
The State drop-down menu contains a complete list of all market states for all exchanges supported by TT. Consult information regarding a specific exchange to learn whether certain market states are supported by that exchange.
To change default block settings, double-click the block to open the Block Editor.
|Name||Name to display beneath the block on the ADL canvas|
|BodyColor||Background color of the block|
Market state to check
|Description||Optional text to explain how the block is used|