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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
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