Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
C-lite return array with indice #479023
02/06/20 06:27
02/06/20 06:27
Joined: Feb 2020
Posts: 2
A
AlgoDyno Offline OP
Guest
AlgoDyno  Offline OP
Guest
A

Joined: Feb 2020
Posts: 2
Hi,
this is my first post here. I just discovered Zorro and this is a gem! Thank you for your hard work!

I've opened the indicator source file to take a look at the fisher normalization function.
I have experience in C/C++ but this is the first time I look at C-lite and this syntax is a bit confusing for me:

Code
return FN[0] = Fisher(Value) + 0.5*FN[1];


Why assigning FN[0] just before the return?
like:
Code
return Fisher(Value) + 0.5*FN[1];


And then I figured out FN[1] is assigned previously in the function as the input Data[1], but not as a Fisher transform.
The return could have been:
Code
return Fisher(Value) + 0.5*Value[1];


I don't think this is the case and
Code
return FN[0] = ...
must mean something I don't know and I can't find on the net.

Thanks for your help!

Re: C-lite return array with indice [Re: AlgoDyno] #479025
02/06/20 10:49
02/06/20 10:49
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This code

return FN[0] = Fisher(Value) + 0.5*FN[1];

sets FN[0] to the returned value.

I suppose that FN is a time series, and FN[1] is then the value that the function returned in the previous call.

https://manual.zorro-project.com/series.htm


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1