Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting EntryHandling || EntriesPerDirection From Program Overridden by BackTest Parameters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting EntryHandling || EntriesPerDirection From Program Overridden by BackTest Parameters

    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).

    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

    Attached Files

    #2
    imported post

    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
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      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
      RayNinjaTrader Customer Service

      Comment


        #4
        imported post

        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

        Attached Files

        Comment


          #5
          imported post

          >> 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.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Working...
          X