TRADE* findTrade(string name)

Posted By: GPEngine

TRADE* findTrade(string name) - 10/19/14 23:59

Code:
TRADE* findTrade(string name);	// find the first trade with the given info

Is this function available in user Strategies? If so, how does it work? Where or How do I set the "name" string of each trade?

I want: efficient lookups of entered trades by unique identifier, regardless of trade status (open, pending, closed). So far I maintain a data structure containing all known TRADE* memory addresses, but this seems fragile.
Posted By: jcl

Re: TRADE* findTrade(string name) - 10/22/14 17:39

It is undocumented, but should work as expected - the name parameter is the algo ID. It returns the first found trade AFAIK.

The official way to look for a trade is enumerating all trades.
© 2024 lite-C Forums