Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimization behaviour I don't understand ....

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

    Optimization behaviour I don't understand ....

    I have attached a simple custom strategy that exhibits some behaviour I don't understand.

    To reproduce what I am seeing:
    1. Import MyCustomTest strategy.
    2. Open StrategyAnalyzer, and set as per the attached screenshot.
    3. Open Output Window.
    4. Open MyCustomTest strategy in NinjaScript Editor, and re-compile.
    5. Run optimization.
    6. “Should_never-appear” appears twice in Output Window!


    The strategy has IsInstantiatedOnEachOptimizationIteration set to false. The strategy is set up to place a long entry order on the 101st bar, and then print something to the Output Window in OnExecutionUpdate() if a certain condition is satisfied.

    By my understanding “Should_never_appear” should not appear in the Output Window in this optimization; it should only be printed if Enums has the value Should_never_appear... but Enums was set to Set_to_this for the optimization.

    Why does the output window show Should_never_appear?
    Attached Files

    #2
    Hello AnotherTrader,

    Thanks for opening the thread.

    I'm seeing the same behavior you are describing and do not expect that output, and when I test the similar case with an integer, I get the expected results. I'm checking into this further with others in the office and will keep you informed as this develops.

    EDIT: This issue was confirmed as a bug and was assigned the ticket ID NTEIGHT-12986. The number for the ticket ID can be found in the Release Notes page of the help guide when a new release of NinjaTrader contains a fix.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Thanks for the report!
    Last edited by NinjaTrader_Jim; 08-03-2018, 07:11 AM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    28 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X