Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, bigsmack), 1,581 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to pass data series() to TMF without globals #484134
09/14/21 11:57
09/14/21 11:57
Joined: Sep 2021
Posts: 13
-
R
Raven478 Offline OP
Newbie
Raven478  Offline OP
Newbie
R

Joined: Sep 2021
Posts: 13
-
Good day,

Is it possible to pass in a vars / series into the TMF without using globals?

The TMF uses a specific series to trail the stoploss. For context, I am running multi assets and algos in the same script hence why I can't use globals.

Re: How to pass data series() to TMF without globals [Re: Raven478] #484139
09/14/21 22:34
09/14/21 22:34
Joined: Jul 2017
Posts: 785
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 785
You can declare a global array of vars and pass just the index of the needed series in that array to the tmf.

Re: How to pass data series() to TMF without globals [Re: Raven478] #484141
09/15/21 06:29
09/15/21 06:29
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
In asset loop:

AssetInt[0] = series(...);

In the TMF:

vars MySeries = AssetInt[0];

Re: How to pass data series() to TMF without globals [Re: Raven478] #484142
09/15/21 08:35
09/15/21 08:35
Joined: Sep 2021
Posts: 13
-
R
Raven478 Offline OP
Newbie
Raven478  Offline OP
Newbie
R

Joined: Sep 2021
Posts: 13
-
Thanks for both replies @Zheka and @Petra. And the code sample is much appreciated @Petra. smile


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1