• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Recompiling script gives different results

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

    Recompiling script gives different results

    Hello,

    I'm not sure how to describe 100% correctly, but I will do my best.

    This is the second time I faced this problem and it is puzzling me. I feel myself kind embarassed asking about that because although I am 100% sure that the strategy was compiled up to date but I have nothing else to back this claim because I have no logs from my side.

    Some information that might help:
    1) I'm using a custom renko bars with real high and low to avoid my historical backtesting results to differ from real time.
    2) I'm using IQFeed connection.
    3) Both backtesting and realtime uses CalculateOnBarClose = true
    4) Symbol is WIN - Bovespa Future - Default session

    The issue:
    - My strategy gave today a false entry signal in realtime test.
    - Backtesting the day gave the same result
    - If I recompile the script, the backtest result is now different from what it was.
    - Market Replay was tried to recheck the day and see if I can find a different outcome, but it ended up with the same result as Backtesting

    To be able to gather more information I am now logging every single information of each bar and the workflow of the script for debugging.

    Since it is not possible to go back to the old compiled state, since recompilation deletes the old file, I would like to know from support if you guys already faced the same problem and if it is possible to give some clues to track down this behavior.

    Is the historical data in NinjaTrader updated after the market closes? Because I left IQFeed connection open and it might been a coincidence for me to recompile and get another result.


    UPDATE::

    Ok, I think i was able to narrow down my debugging. I do have some logging but I thought it was worthless (was kind mad to think straight). I tracked the functions that were called. It is a generic signal log, but there are only a very specific cases it will trigger.

    This signal uses BOP (Balance of Power) value. If I remember correctly, the old signal that was triggered wrong days ago was also relying on BOP values. The signal never got to the threshold to activate, but it seems, somehow, it was triggered in realtime and backtesting before recompilation.

    So it seems some indicator inconsistency, but I can't put my finger on what exactly is creating such behavior.

    Losing the incorrect state was bad for me. Next time I will try to leave the computer untouched and recheck the results on another computer.
    Last edited by eslej; 02-10-2015, 08:05 PM.

    #2
    eslej, thanks for the update on your post and sharing your findings, what kind of smoothing would the BOP use? Is this our standard BOP with the SMA smoothing applied? Did you see any connection losses that might have forced a reload of data for your current day, so you might have arrived at a slighly different tick formation? Perhaps that led to rounding differences on your double value used for comparison?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand.

      Trace log doesn't have a connection loss in log.

      BMF has a Pre-opening auction at 8:55 local time. Market opens more or less 9:00. NinjaTrader seems to get the auction information as if the bar changed. OnBarUpdate() is called even with CalculateOnBarClose is set to true. The same behavior happens when the Pre-closing auction starts.

      Is there any way to tell Ninjatrader to ignore these auctions? Since OnBarUpdate() is called, maybe the indicators are getting an unwanted update?

      I'm using default BOP(XX) from NinjaTrader.
      Last edited by eslej; 02-11-2015, 06:41 AM.

      Comment


        #4
        Thanks eslej, this will depend on your used session template if these periods are included or not in the chart and thus would see OnBarUpdate() calls. The default used template will include all available data, so making a custom template ranging from 9AM until your desired closing time would be likely more consistent then.

        http://www.ninjatrader.com/support/h...on_manager.htm
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ttodua, Today, 01:52 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by muisca, 05-19-2017, 11:49 AM
        8 responses
        6,463 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by NinjaTrader_Brandon, Today, 12:08 PM
        0 responses
        65 views
        0 likes
        Last Post NinjaTrader_Brandon  
        Started by iq200, Today, 12:00 PM
        2 responses
        11 views
        0 likes
        Last Post iq200
        by iq200
         
        Started by valhallafutures, Today, 11:33 AM
        1 response
        18 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Working...
        X