Post subject: Strategy ID on successful compilation
Post rating: 0
Posted: Wed 30 May, 2012, 16:33
User rating: 6
Joined: Thu 19 May, 2011, 11:14 Posts: 235 Location: South Africa,
When a strategy is successfully compiled in the JForex client platform, a console message appears, such as: 15:07:30 Compilation successful. Strategy ID: 9BCFC07B7DD0931724E3FD273C062743
This ID seems to be some kind of hash of the compiled strategy. Is that correct? Is there a way to access this "Strategy ID" from within the strategy? If it is accessible, I would like to use it for version-stamping of logs.
This ID seems to be some kind of hash of the compiled strategy. Is that correct?
Yes.
Isak wrote:
If it is accessible
No. However, essentially the ID is a hash based on the source code content when spaces and new lines are removed. Thus, in strategy onStart you could retrieve by reflection the strategy source, trim it and make your own ID.