Signal
Signal functions are mostly used for generating signals and accessing signal script instances. For performance reasons signals should only be created from the OnInitialize function and never from the OnBarUpdate function or any other frequently called function.
Read more: Signal Scripts
Sections
Name |
Description |
Removes a specified signal from memory. Note that calling this function is rarely required since memory is automatically freed when the script shuts down. |
|
Copies a specified signal from the OnInitialize parameters and assign it a symbol. The function is required since the signal parameters of Multi-Symbol Trading Strategy scripts do not have an underlying symbol assigned to them. |
|
Gets the underlying symbol index of a specified signal. |
|
Gets the trading signal generated by a specified signal for a specified bar, which is equivalent to signalIdentifier[barshift]. (-100 Strong Sell to 100 Strong Buy) |
|
Gets the number of signal values set thus far, or the number of data bars processed thus far. |
SignalRemove(Signal signal) |
||||||
Removes a specified signal from memory. Note that calling this function is rarely required since memory is automatically freed when the script shuts down. Parameters
Scripts TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Pattern, PositionSizing, Signal, TradingStrategy |
Signal SignalSetSymbol(Signal signal, int symbolIndex) |
|||||||||
Copies a specified signal from the OnInitialize parameters and assign it a symbol. The function is required since the signal parameters of Multi-Symbol Trading Strategy scripts do not have an underlying symbol assigned to them. Returns A copy of the specified signal over the specified symbol. Parameters
Scripts MultiSymbolTradingStrategy |
int SignalSymbolIndex(Signal signal) |
||||||
Gets the underlying symbol index of a specified signal. Returns The underlying symbol index of the specified signal. Parameters
Scripts TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Pattern, PositionSizing, Signal, TradingStrategy |
double SignalValue(Signal signal, int barShift) |
|||||||||
Gets the trading signal generated by a specified signal for a specified bar, which is equivalent to signalIdentifier[barshift]. (-100 Strong Sell to 100 Strong Buy) Returns The trading signal generated by the specified signal for the specified bar. (-100 Strong Sell to 100 Strong Buy) Parameters
Scripts TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Pattern, PositionSizing, Signal, TradingStrategy |
int SignalValueCount() |
Gets the number of signal values set thus far, or the number of data bars processed thus far. Returns The number of signal values set thus far, or the number of data bars processed thus far. Scripts Signal |