• 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

Unpredictable behaviour of Strategy Analyzer

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

    Unpredictable behaviour of Strategy Analyzer

    Hello

    I have some questions about unpredictable behaviour of Strategy Analyzer.

    1) Why quantity of deals can be different if I don`t have any connection to Playback Connection or I have it?
    2) Why Stoploss/Takeprofit are different for Analyzer and for Replay? Some stoploss/takeprofit are missing in Analyzer
    3) Why I don`t see any comment about item #2 in Log in Ninja?
    4) Why Analyzer so unpredictable?

    Thanks a lot,
    Sergey

    #2
    Hello sergey_z,

    Thank you for your post.

    For your first question, generally we discourage using the Strategy Analyzer with the Playback Connection together. When using these together in NT8, there are some considerations you must take into account:
    • Historical data requests are influenced by the slider position.
    • The playback slider's location is considered the present. This means
      • Played-over bars are available to the Strategy Analyzer.
      • Historical data in the future of the playback slider are not available to the Strategy Analyzer
    This can cause your Strategy Analyzer results to be considerably different than if you were running it while connected to a normal, real-time data feed.

    As to your second question, differences in fills between backtesting on Market Replay data using the Playback connection vs backtesting with the Strategy Analyzer are expected. This is due to differences in available data between the two.

    During a backtest, fills are determined based on 4 data points, OHLC of a bar since that is the only information that is known during a backtest and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick'.

    Here is a link to our help guide that goes into more detail:

    https://ninjatrader.com/support/help...ime_vs_bac.htm

    As far as not seeing comments regarding missed or rejected orders, I recommend turning on the Order Trace function for your strategy if this is one you created yourself.

    Strategy Builder > Default Properties > More Properties > Trace Orders, or:

    Code:
        if (State == State.SetDefaults) 
        { 
            TraceOrders = true; 
        }
    Once you then recompile the strategy, you can open a new NinjaScript Output window under New > NinjaScript Output. This will print a log of any orders submitted by the strategy during while it's running, along with any ignored orders. You can then look through and see what may be occurring.

    Here is a link to our help guide that goes into more detail on tracing orders:
    https://ninjatrader.com/support/help...aceorders2.htm

    As for being unpredictable, I would say it's actually quite predictable. Understanding how the Analyzer functions is integral to being able to properly utilize it as a tool. Understanding the information about discrepancies linked above will also help your results be more predictable. Here is a link to our help guide on the Strategy Analyzer:
    https://ninjatrader.com/support/help...y_analyzer.htm

    Also, here is a publicly available video that goes over the Strategy Analyzer:
    https://www.youtube.com/watch?v=GMwV1qShy3g

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by y97p6e18, Today, 02:35 AM
    0 responses
    3 views
    0 likes
    Last Post y97p6e18  
    Started by cls71, Today, 02:20 AM
    0 responses
    1 view
    0 likes
    Last Post cls71
    by cls71
     
    Started by MarkaAllgood, Today, 01:17 AM
    0 responses
    3 views
    0 likes
    Last Post MarkaAllgood  
    Started by assik, Today, 01:00 AM
    0 responses
    5 views
    0 likes
    Last Post assik
    by assik
     
    Started by manueldecastro, Yesterday, 11:55 PM
    0 responses
    4 views
    0 likes
    Last Post manueldecastro  
    Working...
    X