Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
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: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
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 | chip programmers | 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