Available translations

Accessing Trading System Definitions and Session Parameters

Summary: The Trading System may access it's own definitions as well as Session Parameters from any Formula or Condition.
Trading System definitions and Trading Session Parameters are accessible from within conditions and formulas, pretty much like conditions and formulas may access the values of indicators, or the Trading Engine hierarchy.
To access a trading system definition, follow the path given by the trading system structure. For example, to access a condition in the take position event, use:
To access a trading session parameter, use the syntax starting with sessionParameters followed by the name of the parameter, and the name of the specific parameter in the configuration. For example, to access the taker parameter in the fee structure, use:
Such a feature may be useful, for instance, to include such definitions or parameters on Telegram announcement messages, as in:
 "The condition with the following code: " + 
tradingSystem.tradingStrategies[tradingEngine.tradingCurrent.strategy.index.value].triggerStage.takePositionEvent.situations[0].conditions[0].code +
" triggered the take position event."
Notice that...
... corresponds to the syntax deriving from the trading engine hierarchy.
Accessing Runtime Data