Gamestudio Links
Zorro Links
Newest Posts
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
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Petra, AndrewAMD, VoroneTZ, 2 invisible), 822 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Custom indicators and TA-lib #482058
12/14/20 10:01
12/14/20 10:01
Joined: Dec 2020
Posts: 13
B
bot Offline OP
Newbie
bot  Offline OP
Newbie
B

Joined: Dec 2020
Posts: 13
I see ta-lib.zip as part of Zorro installation but cannot find anywhere where this is used. Can you please point to where it is used?

Also, what are the exact definitions of these functions, what do they do and where are the source codes for these?

SETSERIES(Data,Period);

series(x,y);

Finally, do the functions inside indicators.c get called for each tick and from where/how?

Re: Custom indicators and TA-lib [Re: bot] #482059
12/14/20 13:50
12/14/20 13:50
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
It’s precompiled into Zorro.

Re: Custom indicators and TA-lib [Re: AndrewAMD] #482060
12/14/20 15:52
12/14/20 15:52
Joined: Dec 2020
Posts: 13
B
bot Offline OP
Newbie
bot  Offline OP
Newbie
B

Joined: Dec 2020
Posts: 13
How about this?

Also, what are the exact definitions of these functions, what do they do and where are the source codes for these?

SETSERIES(Data,Period);

series(x,y);

Finally, do the functions inside indicators.c get called for each tick and from where/how?

Re: Custom indicators and TA-lib [Re: bot] #482061
12/14/20 16:17
12/14/20 16:17
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Zorro is not open source. Some functions are open source. The ones that are have a check mark in this list are open source and zipped up in the source folder:
https://zorro-trader.com/manual/en/funclist.htm

You are responsible for calling series() and indicator functions on the script side. Zorro iteratively calls the run() function, which is where you place your indicator function calls.

The free tutorial with the free Zorro software starts here. It's well worth your time, as it will answer most of your questions:
https://zorro-project.com/manual/en/tutorial_var.htm

Re: Custom indicators and TA-lib [Re: AndrewAMD] #482062
12/14/20 17:04
12/14/20 17:04
Joined: Dec 2020
Posts: 13
B
bot Offline OP
Newbie
bot  Offline OP
Newbie
B

Joined: Dec 2020
Posts: 13
Thank you for the links, I don't need the source code, but want the function definition like inputs/outputs so that I can use to write my own indicators for Zorro.

I see SETSERIES(Data,Period); is used heavily inside indicators.c but cannot find the function definition for it.

Can someone from Zorro dev team answer on this pls?

Re: Custom indicators and TA-lib [Re: bot] #482063
12/14/20 17:38
12/14/20 17:38
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by bot
Thank you for the links, I don't need the source code, but want the function definition like inputs/outputs so that I can use to write my own indicators for Zorro.

I see SETSERIES(Data,Period); is used heavily inside indicators.c but cannot find the function definition for it.
You never call SETSERIES() in Zorro, ever. It's buried in the backend and not callable in the script.

series() is defined here:
https://zorro-project.com/manual/en/series.htm

Re: Custom indicators and TA-lib [Re: bot] #482064
12/14/20 17:41
12/14/20 17:41
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago

Re: Custom indicators and TA-lib [Re: AndrewAMD] #482066
12/14/20 18:07
12/14/20 18:07
Joined: Dec 2020
Posts: 13
B
bot Offline OP
Newbie
bot  Offline OP
Newbie
B

Joined: Dec 2020
Posts: 13
Thank you that is useful.

One thing that isn't clear to me is where to add the custom indicators? in indicators.c file?

Also, in the same file most of the indicators call SETSERIES, as in example below:

// Awesome Oscillator
var AO(var* Data)
{
var R = SMA(Data,5)-SMA(Data,34);
SETSERIES(Data,34);
return R;
}

That is the reason I want too know what is the purpose of SETSERIES function?

Re: Custom indicators and TA-lib [Re: bot] #482067
12/14/20 20:06
12/14/20 20:06
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by bot
One thing that isn't clear to me is where to add the custom indicators? in indicators.c file?

Also, in the same file most of the indicators call SETSERIES, as in example below:

// Awesome Oscillator
var AO(var* Data)
{
var R = SMA(Data,5)-SMA(Data,34);
SETSERIES(Data,34);
return R;
}

That is the reason I want too know what is the purpose of SETSERIES function?
Zorro ignores the indicators.c file completely, and therefore you should ignore indicators.c. It is impossible for you (the script-writer) to use SETSERIES, so ignore that too.

You put your custom indicator function either in a header file and include it, or put it above the run() function. Both have the same effect of working.

Re: Custom indicators and TA-lib [Re: AndrewAMD] #482166
01/04/21 23:14
01/04/21 23:14
Joined: Dec 2020
Posts: 13
B
bot Offline OP
Newbie
bot  Offline OP
Newbie
B

Joined: Dec 2020
Posts: 13
What does the SETSERIES function do? Why is it used in few places? e.g. in // Awesome Oscillator

SETSERIES(Data,34);

What does the series function do?

How to access the TA LIB functions?

Last edited by bot; 01/04/21 23:16.

Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1