Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Weird optimizing result!!!
Collapse
X
-
Weird optimizing result!!!
When I adopt a strategy to a chart, the buy and sell signals are all looked at the right direction. But when I optimize it, it turned everything red!!! I had lost my underpants off!!! It turned out as ugly as it gets!!! Why!?!?!? I don't understand!!!Tags: None
-
Hello YoutingChu,
Thanks for writing in.
When you run a normal backtest, do you see the same results listed for the parameters configured as you see for those same parameters of an optimization iteration? I have attached two pictures of the Strategy Analyzer running an optimization backtest on the SampleMACrossover strategy showing results for the parameter set of Fast: 10 and Slow: 25. The results are matching the normal backtest which is what we would expect to see for an optimization backtest.
If you do not have matching results between normal and optimization backest iterations using the same parameters, I would check to see if you have IsInstantiatedOnEachOptimizationIteration enabled as this parameter will vary your optimization results if you have not written the strategy properly. (Variables must be reset in State.DataLoaded so their values are clean for each backtest iteration.)
As for comparing chart results using realtime data to that of backtests, certain discrepancies must be considered when comparing the results. This is because backtests will use historical data while running a strategy on a live account will use realtime data.
I have attached additional resources on the concepts discussed below.
IsInstantiatedOnEachOptimizationIteration - https://ninjatrader.com/support/help...niteration.htm
Comparing real-time, historical, and replay performance - https://ninjatrader.com/support/foru...d.php?t=102504
Discrepancies between realtime and backtest - https://ninjatrader.com/support/help...ime_vs_bac.htm
If the information provided does not lead you to a resolution, could you provide screenshots of the results that you are comparing (including the parameters used to configure your tests) so I may provide further input?
I look forward to being of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bmartz, Today, 09:30 AM
|
2 responses
11 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
3 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM |
Comment