Signal Helpers
Last updated
Last updated
Converts 4 boolean values to a signal.
BoolToSignal([ isLong ], [ isShort ], [ isExit ], [ isNone ])
The signal as a result of the boolean values.
Return Type: Enum
Converts the signal if its matches the defined one.
ConvertSignal(signal, signalToCovert, convertedSignal)
Returns the original or converted signal depending on the input.
Return Type: Enum
Saves and delays a signal by a number of minutes.
DelaySignal(signal, minutes)
Returns the saved signal from a number of minutes back or SignalNone when it doesn't have a delayed signal yet.
Return Type: Enum
Returns a continuous signal when values are above/below of each other.
GetAboveBelowSignal(fast, slow)
Returns SignalLong when fast is above slow, SignalShort when fast is below slow and SignalNone will occur if values are exactly the same.
Return Type: Enum
Determines the signal from a result with a buy and sell level.
GetBuySellLevelSignal(value, buyLevel, sellLevel)
Returns SignalLong when the result is below the buy level, SignalShort when the result is above the sell level and SignalNone when the result between the buy and sell level.
Return Type: Enum
Counts the number of signals. When the majority agrees it will return the signal.
GetConsensusSignal(signals[])
Returns SignalLong, SignalShort, SignalExitPosition or SignalNone when there is a consensus or SignalNone when there is not.
Return Type: Enum
Determines the signal from a result with a crossover or -under level.
GetCrossOverUnderSignal(fast, slow)
Returns SignalLong when the a crossover occurs, SignalShort when a crossunder occurs and SignalNone when non one those happened.
Return Type: Enum
Gets the remote signal which is published by SaveRemoteSignal()
GetRemoteSignal(id)
Returns a trade signal enumeration. For example SignalLong(), SignalShort(), SignalExitPosition(), SignalNone() or SignalError().
Return Type: Enum
Returns a continuous trade signal with defined signal type and values.
GetSuperSignal(indicatorValue, signalValue, signalType, [ centerPosition ], [ buyLevel ], [ sellLevel ])
Returns a signal based on defined 'signalType' (see InputSignalTypes()).
Return Type: Enum
Determines the signal based on a result and a threshold.
GetThresholdSignal(value, threshold, [ swing ])
Returns SignalLong when the result is below the threshold and SignalShort when the result is above the threshold.
Return Type: Enum
Validates if all signals are the same.
GetUnanimousSignal(signals[])
Returns SignalLong, SignalShort or SignalNone when there is unanimous decision and SignalNone when there is not.
Return Type: Enum
Calculates and determines the weighted consensus signal.
GetWeightedConsensusSignal(longWeight, shortWeight, exitWeight, signals[])
Returns SignalLong, SignalShort, SignalExitPosition or SignalNone when there is a consensus or SignalNone when there is not.
Return Type: Enum
Marks the signal to be ignored when it matches a certain signal.
IgnoreSignalIf(signal, signalToIgnore)
Returns the original signal.
Return Type: Enum
Converts the signal if its matches the defined one.
MapSignal(signal, signalToCovert, convertedSignal)
Returns the original or converted signal depending on the input.
Return Type: Enum
Converts a position value to 3 boolean values.
PositionToBool(position)
Three boolean values based on the position input.
Return Type: Dynamic
Reverses a signal from long to short or short to long. SignalNone will be ignored and stay the same.
ReverseSignal(signal)
Returns the reversed signal.
Return Type: Enum
Maps a signal value to their defined specifications.
SignalMapper(signal, [ reverse ], [ mapLongTo ], [ mapShortTo ], [ mapExitTo ], [ mapNoneTo ])
The mapped signal.
Return Type: Enum
Sets properties such as weight or ignore in the signal input.
SignalProperties(signal, [ useLong ], [ useShort ], [ useExit ], [ weight ], [ delay ])
Returns the signal with the new specifications.
Return Type: Enum
Converts a signal value to 4 boolean values.
SignalToBool(signal)
Four boolean values based on the signal input.
Return Type: Dynamic
Logs the given signals.
SignalToLog(signals)
Return Type: Void
Add a weight to the signal. Can be used in combination with GetWeightedConsensusSignal().
SignalWeight(signal, weight)
Returns the original signal with a weight mark.
Return Type: Enum
Marks the signal to be used when its matches a certain signal.
UseSignalIf(signal, signalToUse)
Returns the original signal.
Return Type: Enum