Posted By: Hredot
reverseLong and reverseShort documentation? - 02/17/18 00:51
The manual has mentioning of the functions reverseLong and reverseShort in some example scripts, but there does not seem to be a dedicated page explaining the functions and parameters they take. Will that be added?
Posted By: Sphin
Re: reverseLong and reverseShort documentation? - 02/17/18 10:31
These functions were replaced since 1.66, from What's new:
Zorro 1.66 (released September 2017)
[...]
The "reverse" helper functions have been replaced by the MaxLong / MaxShort variables.
Posted By: Hredot
Re: reverseLong and reverseShort documentation? - 02/17/18 15:40
I see! Thanks for the heads up, Sphin!
Posted By: jmlocatelli
Re: reverseLong and reverseShort documentation? - 03/19/18 21:05
I'm also looking for documentation on how reverseLong and reverseShort works.
In the Zorro documentation there is this example:
// if rsi crosses over buy level, exit short and enter long
if(crossOver(rsi12,75))
reverseLong(1);
// if rsi crosses below sell level, exit long and enter short
if(crossUnder(rsi12,25))
reverseShort(1);
Can someone explain what is the relation between this example and the MaxLong and MaxShort variable?
The only place I found some information was the in the include file default.c, but I was not able to understand it.
att,
jm
Posted By: jcl
Re: reverseLong and reverseShort documentation? - 03/20/18 10:39
reverseLong(1) was the same as MaxLong = 1; enterlong();.
It just limits the number of open trades and updates currently open trades.