Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, AndrewAMD, Quad), 733 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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