Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Strategy run with Optimization API not agreeing with manual running of strategy
Dear Traders, I'm encountering a puzzling problem while working with the EasyLanguage Optimization API in TS 9.5. My strategy has several inputs, one of them which I am optimizing will take 3 values - 0 (disable this parameter), 1 (do a certain calc), and 2 (do a slightly different calc). When I simply apply the strategy manually to my chart (1 year of DOW emini 5 minute), all 3 parameter values will evaluate correctly... but when I run an API optimization of my strategy of that parameter for those 3 values, only the 0 value (ie. parameter is disabled) will give the correct output. Parameter values 1 and 2 produce results which are way off. It's confounding. I'm even using the exact barebones sample code which is in the Optimization API manual.
If I could get the API to somehow output a list of the individual trades for each of the 3 optimization backtests, then I might have a fighting chance of narrowing down the problem by comparing that to the list of trades from the manual Strategy Performance Report... but from what I can see, there doesn't look to be a way to output individual trades using the API. Can anyone offer any help please? Very much appreciated!
Cheers
Shawn
Can you help answer these questions from other members on NexusFi?
I have seen this issue before just in normal optimization, without the api, and feel its impossible to solve, partly because its so erratic. It just goes away for unknown reasons.
You can try ts 10, though I understand a significant amount of people dont want to do that.
If you go to 10, build 68 is the most stable for trading. What comes after that for my users was much less stable.
Likely doesnt matter for a development machine.
By the way, I know of no way to get to build 68. Only the base build is build 70
ts support has improved, so you could try them or the ts forum
Thanks so much bfulks and kiwibird for the help. Well, with the help of some "Print" statements I was able to quickly pinpoint what the problem was with the calling of my strategy from an API TradingApp - I simply needed these 2 statements in my "DefineJob" section:
The API execution of my strategy was reading my DOW emini datafile 1 hour "later" (ie. timestamps all 1 hour later) than the correct manual running of my strategy, and of course this was greatly throwing off my results which would depend on time-of-day.
These are important statements when running the optimization API... be careful not to overlook them!