PDA

View Full Version : Setting EntryHandling || EntriesPerDirection From Program Overridden by BackTest Parameters


KBJ
04-28-2007, 12:22 PM
From reading the help, it seems like setting EntryHandling and EntriesPerDirection should affect the operation of a strategy.

My testing shows that changing these values...

protected override void Initialize()
{
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
}
...does not affect the operation of the program, as they are instead overridden by the values specified as backtest parameters (see attachment).http://us.mg1.mail.yahoo.com/ya/download?fid=Inbox&mid=1_1988748_AH1Fv9EAAIoDRjPWu AcwGQiZ%2BEo&pid=2&tnef=&YY=1177802416332&newid=1& clean=0&inline=1

I used the following code to verify this...

if ((EntryHandling != EntryHandling.AllEntries) // Correct settings?
|| (EntriesPerDirection != 1))
{ // No...
Print( "**** Error - Entry handling is not set to AllEntries 1" );
return; // Exit, effectively killing strategy.
}

Although I haven't tested this during live operations, I suspect it may work the same, as the same "Order Handling" properties exist in the "New Strategy" parameter selection screen.

KBJ

NinjaTrader_Ray
04-28-2007, 12:30 PM
Your observation is correct in that the strategy dialog window sets these properties.

Are you saying that the strategy dialog window does not load these strategy default settings?

Ray

NinjaTrader_Ray
04-28-2007, 12:35 PM
Disregard, I just checked, these settings are not loaded into the dialog. The last user changed settings are persisted.

Will need to think about what expected behaviour should be and will get back to you.

Ray

KBJ
05-01-2007, 07:39 AM
For now, its not an issue for me, since I've built checking into my strategy (see prior post), so I'm assured that it will be run correctly.

Regarding setting other values as backtest parameters, there's a section called "Data Series" which allows specification of a Type and Value (see attachment). I found that adding the following statement to Initialize() suppresses this section of the backtest parameters:

DataSeriesConfigurable = false;
But there doesn't seem to be any way to specify the period type and value under program control.

I'd like to do this so I don't have to enter these values every time I run the program.

Is there a way to do this?

Its not real important, but every now and then I forget, which causes real strange results (since the program is expecting tick data, and backtest is providing it 1-minute bars instead.)

KBJ

NinjaTrader_Dierk
05-01-2007, 08:24 AM
>> But there doesn't seem to be any way to specify the period type and value under program contro

Sorry, not supported at this time.