![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Feb 2009
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
Dear support!
I created the following strategy (OnBarUpdate): if (CrossAbove(Close, EMA(SMA_Length), 1)) { EnterLong(1, ""); } if (CrossAbove(Close, EMA(SMA_Length2), 1)) { EnterLong(1, ""); } if (CrossAbove(Close, EMA(SMA_Length3), 1)) { EnterLong(1, ""); } // Condition sets close if (CrossBelow(Close, EMA(SMA_Length), 1)) { ExitLong(1); } if (CrossBelow(Close, EMA(SMA_Length2), 1)) { ExitLong(1); } if (CrossBelow(Close, EMA(SMA_Length3), 1)) { ExitLong(1); } When optimizing, however, I receive only the optimal values for the first two SMA_Length variable, the third stays at one, but does generate any entries, exits. I used the ranges 10;30;4, 20;80;5 and 50;200;10. Entries per direction is set at 3, EntryHandling AllEntries. Order Quantity = by strategy, Gtc What is more is that while showing a Profit Factor of 2,3 the culumated profit is 2.508,52%. How is this calculated? Kindest regards, nescio |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
nescio,
Not sure what you mean. All 3 parameters are optimized. If your results shows one parameter at a set value then that would be the parameter setting that just happened to yield the best results constantly with the different combinations of other variables. http://www.ninjatrader-support.com/H...fitFactor.html http://www.ninjatrader-support.com/H...tedProfit.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2009
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
For some reason, I wasn't able to reproduce the values mentioned in my previous post, although I used the same parameters.
I hope the screenshots show you what I mean. Compare the figures derived from the optimization with the input values... |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please try with SampleMACrossOver and see what you get with that strategy.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2009
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
Seems to work with the Sample Strategy. Any idea why this could be the case?
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Take it one step at a time. Please try adding signal names to your entry and tie specific exits to those entries.
Reduce it down to two parameters. Try with only one entry at a time. Have you tried restarting NinjaTrader also?
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Incorrect Strategy Analyzer Optimization Results Displayed | trader_rick | Strategy Analyzer | 10 | 03-24-2011 04:13 AM |
| Automated Strategy help needed | suprsnipes | Strategy Analyzer | 3 | 10-17-2008 03:39 PM |
| New user Q's: Optimization methods and multiple bar series | bluelou | General Programming | 6 | 06-12-2008 01:46 PM |
| indicator optimization in a strategy | tecmisc1 | Strategy Development | 2 | 04-08-2008 08:22 PM |
| Strategy: Using multiple entry/exit signals simultaneously | NinjaTrader_Josh | Reference Samples | 0 | 09-06-2007 12:56 PM |