Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
7 registered members (EternallyCurious, 7th_zorro, Ayumi, Quad, AndrewAMD, ricky_k, 1 invisible), 497 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
reverseLong and reverseShort documentation? #471043
02/17/18 00:51
02/17/18 00:51
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
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?

Last edited by Hredot; 02/17/18 00:52.
Re: reverseLong and reverseShort documentation? [Re: Hredot] #471049
02/17/18 10:31
02/17/18 10:31
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
These functions were replaced since 1.66, from What's new:
Quote:
Zorro 1.66 (released September 2017)
[...]
The "reverse" helper functions have been replaced by the MaxLong / MaxShort variables.

Re: reverseLong and reverseShort documentation? [Re: Sphin] #471053
02/17/18 15:40
02/17/18 15:40
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
I see! Thanks for the heads up, Sphin!

Re: reverseLong and reverseShort documentation? [Re: Sphin] #471795
03/19/18 21:05
03/19/18 21:05
Joined: Oct 2017
Posts: 52
Brazil
J
jmlocatelli Offline
Junior Member
jmlocatelli  Offline
Junior Member
J

Joined: Oct 2017
Posts: 52
Brazil
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

Re: reverseLong and reverseShort documentation? [Re: jmlocatelli] #471807
03/20/18 10:39
03/20/18 10:39
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
reverseLong(1) was the same as MaxLong = 1; enterlong();.

It just limits the number of open trades and updates currently open trades.

Re: reverseLong and reverseShort documentation? [Re: jcl] #471814
03/20/18 13:39
03/20/18 13:39
Joined: Oct 2017
Posts: 52
Brazil
J
jmlocatelli Offline
Junior Member
jmlocatelli  Offline
Junior Member
J

Joined: Oct 2017
Posts: 52
Brazil
tks,


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1