Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,621 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Getting current parameter values in objective() #486021
05/31/22 13:36
05/31/22 13:36
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
Parameters[i].Min/Max/Step are set, but not Parameters[i].Value (nor Parameters[i].Best).

If that's not a bug, how is one supposed to access current parameter values (besides declaring them global)?

Re: Getting current parameter values in objective() [Re: Zheka] #486023
05/31/22 13:44
05/31/22 13:44
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Parameters are returned by optimize().

https://zorro-project.com/manual/en/optimize.htm

For using them in other functions, store them in a global array.

Re: Getting current parameter values in objective() [Re: Zheka] #486027
05/31/22 15:42
05/31/22 15:42
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
I thought optimize() sets Parameters[i].Value...and an array of PARAMETER structs - available via Parameters - is exactly the global array for such purposes.

Re: Getting current parameter values in objective() [Re: Zheka] #486028
05/31/22 16:30
05/31/22 16:30
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
That's for external optimization. Optimize() does not set the values, but reads them.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1