LastSignal as Number

LastSignal returns an integer value representing the last action bafore the last one. To have the last one, use Signal function. It returns: Cover (-2), Sell (-1), Neutral (0), Buy (1) and Short (2).

 

This function has no parameter
   

 

Example:

It can be usefull when you have big systems that give you more than one buy signal before a sell signal.
Use for example at the end of the "For" loop:


If Signal = LastSignal then Neutral(0) to cancel previous action.