Trading system toolbox
|SYNTAX||flip( ARRAY1, ARRAY2 )|
works as a flip/flop device or "latch" (electronic/electric engineers
will know what I mean)
returns 1 from the first occurence of "true" signal in Array1
until a "true" occurs in Array2 which resets the state back to zero
unil next "true" is detected in Array1...
buy = ExRem( buy, sell );
buy = Flip( buy, sell ); // this essentially reverts the process of ExRem - multiple signals are back again
The Flip function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.