Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 810 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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