Customizing Indicators

There are 4 ways in which we can maniplulate the indicator signal returned by the Easy Indicator commands. We can reverse, convert/map, ignore or delay it.

Reversing Signals

Reversing a signal can have a lot of impact on a backtest results. For the good and for the bad. Its not a bad idea to experiment with this option.

Its very simple to reverse a signal in HaasScript. We can use the ReverseSignal command. This command will change a SignalLong to SignalShort and a SignalShort to a SignalLong

When the signal is SignalNone or SignalExitPosition is wont change.

Converting Signals

A other way of changing signals is converting or mapping them. We can do this by using the ConvertSignal command. It takes 3 parameters. The orignal signal, the signal we want to convert and the signal we want to convert to. The command will return the orignal signal when it doesnt match the signal we want to convert.

Ignoring Signals

Ignoring signal is a way of excluding specific signal. This technique is usually used in combination with a consensus signal. When we for example want to use 3 indicators to go long and 2 indicators to go short. If we ignore the signal of one of the indicators, it doesnt have an impact on our short consensus decision. This way the other 2 indicators need to agree to go short before we do. We can ignore signals with the IgnoreSignalIf command.

Delay Signals

The last trick we can do with the signals is delaying them. We will use the DelaySignal command and specify the number of minutes we want to delay the signal.

The command takes 2 parameters. The current signal and the number of minutes to delay the signal. The most dynamic way is to define an input for the minutes parameters. This way we can tune it later without updating the whole script.

Last updated