Gamestudio Links
Zorro Links
Newest Posts
Help with Data import to T1
by AndrewAMD
45 minutes 48 seconds ago
Using ":L" & ":S" causes 2 possible bug(s) or is it bad coding?
by AndrewAMD
Today at 03:54
Correlation -1.#IND00
by AndrewAMD
01/21/19 17:37
Basic thread safety question
by Superku
01/20/19 18:15
Blog Post: Get Historical Data from Darwinex REST API w/ Zorro
by AndrewAMD
01/19/19 22:19
Reseting a static variable - the next day
by OptimusPrime
01/19/19 19:48
Train algorithms separatery
by 3dgamelight
01/18/19 10:37
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
12 registered (Iglarion, AndrewAMD, Michael_Schwarz, ags, chsmac85, kvm, ibne, alibaba, 3 invisible), 431 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
laz, ramonne, SibJac, Evael, NRW
18156 Registered Users
Topic Options
Rate This Topic
#472894 - 05/28/18 21:03 Discontinued functions, macros and variables
Joaquin Offline
Newbie

Registered: 04/29/13
Posts: 35
Hi all,

Is there a list of discontinued functions, macros, and variables, and their newer versions (or at least the substitution of the previous command), as newer Zorro versions come out?

Because it is very annoying to code programs from 2 years ago and realize that in newer versions the same program does not compile.

Examples:
setf, resf, and I am pretty sure that there are many many others.

I must say that before asking here for this info, I have already look for it in the manual and in the "What's new" section. But haven't found anything yet.


Edited by Joaquin (05/28/18 21:14)

Top
#472898 - 05/28/18 22:44 Re: Discontinued functions, macros and variables [Re: Joaquin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26694
Loc: Frankfurt
Zorro is not yet old enough to have discontinued functions, at least as to my knowledge.

Top
#472901 - 05/29/18 00:01 Re: Discontinued functions, macros and variables [Re: jcl]
Joaquin Offline
Newbie

Registered: 04/29/13
Posts: 35
ok... then what should I do to compile

// don't trade when the equity curve goes down
// and is below its own lowpass filtered value
function checkEquity()
{
// generate equity curve including phantom trades
vars EquityCurve = series(EquityLong+EquityShort);
vars EquityLP = series(LowPass(EquityCurve,10));
if(EquityLP[0] < LowPass(EquityLP,100) && falling(EquityLP))
setf(TradeMode,TR_PHANTOM); // drawdown -> phantom trades
else
resf(TradeMode,TR_PHANTOM); // profitable -> normal trades
}

? It's from the manual, I'm using Zorro 1.66. Am I missing a header file?

Top
#472906 - 05/29/18 10:16 Re: Discontinued functions, macros and variables [Re: Joaquin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26694
Loc: Frankfurt
The manual contains usage examples. For compiling them, just use them in a suited script.

Top
#472908 - 05/29/18 10:38 Re: Discontinued functions, macros and variables [Re: jcl]
Joaquin Offline
Newbie

Registered: 04/29/13
Posts: 35
Thanks for your answer jcl,

the thing is that if I try to compile the function above, which I got from the online manual, in
http://www.zorro-trader.com/manual/en/trademode.htm

with Zorro 1.66, I get a compilation error saying that it does not know what is setf and resf

If I open the manual by clicking the Help button in my terminal, it is true that this same function is different:

// equity curve trading: switch to phantom mode when the equity
// curve goes down and is below its own lowpass filtered value
function checkEquity()
{
if(Train) { Lots = 1; return; } // no phantom trades in training mode
vars EquityCurve = series(ProfitClosed+ProfitOpen);
vars EquityLP = series(LowPass(EquityCurve,10));
if(EquityLP[0] < LowPass(EquityLP,100) && falling(EquityLP))
Lots = -1; // drawdown -> phantom trading
else
Lots = 1; // profitable -> normal trading
}

So, maybe I got it wrong... Is the online manual referring to a newer version than mine? I imagine that, according to your answer, that is actually what is happening here.. Am I right?

Top
#472909 - 05/29/18 13:04 Re: Discontinued functions, macros and variables [Re: Joaquin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26694
Loc: Frankfurt
Certainly.

Top
#472922 - 05/29/18 21:29 Re: Discontinued functions, macros and variables [Re: jcl]
Joaquin Offline
Newbie

Registered: 04/29/13
Posts: 35
Ooops.. ok then, feel free to slap me in the face

Sorry for that :-)

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de