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
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,577 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
Page 2 of 2 1 2
Re: TMF that cancels pending orders and enters trades [Re: forexcoder] #452511
06/15/15 07:31
06/15/15 07:31
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
They are individual variables of a trade or asset, and not necessarily related to TMFs. For example, a TradeVar can be used to store the value of a certain indicator at the moment of entering a trade, for statistical purposes. And an AssetVar could be used for counting the number of trades that were entered with that asset.

But the usual case is using TradeVars in a TMF for storing values that need to be preserved between TMF calls. For instance, counting something or storing the maximum or minimum of something.

Re: TMF that cancels pending orders and enters trades [Re: jcl] #452515
06/15/15 10:02
06/15/15 10:02
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline
Newbie
forexcoder  Offline
Newbie

Joined: Feb 2015
Posts: 45
Italy
Thanks jcl. Could you do an example? So it is more clear!

Re: TMF that cancels pending orders and enters trades [Re: forexcoder] #452516
06/15/15 11:23
06/15/15 11:23
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Problem is that I have no real example: AFAIK in none of our scripts we've used a TradeVar or AssetVar. But the original script of the thread starter would need two AssetVars if it were a portfolio script. They would be defined this way:

#define LastWeekClose AssetVar[0]
#define CancelOtherTrades AssetVar[1]

and then can be set and reset in a TMF as well as in the main script.

Page 2 of 2 1 2

Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1