Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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: 781
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 781
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: 581
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 581
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