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)
For annual profit I would suggest systemPerformance.AllTrades.TradesPerformance.TradesPerDay * 365 * systemPerformance.AllTrades.TradesPerformance.Currency.CumProfit / systemPerformance.AllTrades.Count
(There may be better ways, that's without pulling up documentation or intellisense)
Store the date of the first and last trades as follows:
Then you can determine Annual Profits as (systemPerformance.AllTrades.TradesPerformance.GrossProfit + systemPerformance.AllTrades.TradesPerformance.GrossLoss) / number of years;
thank you for the suggestions. I will try it very soon. MooreTech, your approach is a little more complicated than the fluxsmith's one. Don't you think it is possible to calculate the way he says?
Sometimes I wonder if I go in circles, then I realize I haven't, which then makes me wonder even more .. I was using various 'optimization functions' available to NT7, and after a long day and night of jumping from one machine to another VM and back again (and seeing the same results too many times) I thought for sure I was ready for sleep so I did ... in the morning the results were still there ... blessed be: your Quality3.cs is giving me the same results, both on variables inputs AND $$/trades summary that the SQN.cs (
This is Van Tharp's System Quality Number (SQN) optimizer type for NinjaTrader. Place the SQN.cs file in your Documents\NinjaTrader 6.5\bin\custom\Type directory and then exit and reload Ninja.
Here is information from Ragingbull on SQN:
The code itself …
) is producing ...
the only diff is the very nice 'performance' rating supplied by your code (4+ rating in a test of a long only strategy in a period of choppy bearish action)
now I dont know if I should be
or
or
or
Any thoughts ? I KNOW the code is different, just wondering if you had noticed the parallel results?
They're based on the same principle, so they would often return the same scoring order of parameters. Mine does try to make some adjustments for conservatism, and annualizes the score, which is why on a backtest over less than a year you'll see higher scores on mine (and lower scores on a backtest over more than a year).
why would it work better to try to backtest and optimize on a very long time frame - markets change all the time - i find that when i backtest for about 60-90 days and walkforward about 30 days it gives pretty good results overall for the next week or so to live run -
what i am still having a difficult time with is finding the right parameter set count - where a function or system will automaticlly calculate the population number and iterations it needs based on the parameter set count
I look at markets as having different personalities when they are bullish or bearish, so different parameters or even different straegies may have to be used.
Personally, I feel that it is better to optimize on the most demanding conditions: currently I am working on LONG ONLY(testing in choppy bearish time period) and SHORT ONLY(testing in choppy bullish time period) testing of strategies.