• 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

Loading template to Strategy Analyzer screws up the DataSeries

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

    Loading template to Strategy Analyzer screws up the DataSeries

    Hi,
    when using a strategy in the Strategy Analyzer, and loading a saved template of that strategy, the DataSeries can be corrupted.

    See pic1 which has the strategy set.
    Click image for larger version

Name:	pic1.PNG
Views:	33
Size:	85.9 KB
ID:	1108810
    See pic2 which is what is left after loading the template.
    Click image for larger version

Name:	pic2.jpg
Views:	23
Size:	35.7 KB
ID:	1108811
    If user clicks Run, NinjaTrader crashes and quits.

    Here is some trace file content:

    2020-07-08 17:22:14:853 *************** unhandled exception trapped ***************
    2020-07-08 17:22:14:853 Object reference not set to an instance of an object.
    2020-07-08 17:22:14:855 System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.NinjaScript.NinjaScriptBase.<>c__Displ ayClass135_3.<InitializeBars>b__6(Object x)
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()

    I've attached the template for you to peruse.

    Thanks,
    saltminer
    Attached Files

    #2
    Hello saltminer,

    Thank you for the post.

    In this situation I don't have your strategy to test this template with, are you able to see this happening with the SampleMACrossOver? If so can you save a template with that and re attach it?

    Did you save the template and then make changes to the strategy or does this occur every time you save a template and re load it with any strategy? I tried this with the sample on my end by saving a template with the analyzer and re loading it but did not see what you described.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,
      I suspect that if the template is saved on a chart which is set to a BarsType that is then not present when the template is loaded in the StrategyAnalyzer (such as on another computer) this is when the problem occurs.. On a chart, the template load does not change the DataSeries. I assert that on the Strategy Analyzer it does, and can fall over when trying to do so.

      saltminer

      Comment


        #4
        Hello saltminer,

        From the initial post's template I don't see a custom BarsType is being used so I am not certain if that is part of the problem. If you have a set of steps that produce the error with or without a custom bars type I would be happy to try and test it further.

        You could test the situation by creating a duplicate BarsType from one of the stock ones and then try that.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by webus, Today, 02:03 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Polufson, 07-30-2020, 06:34 PM
        9 responses
        56 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by bosajin, Yesterday, 05:37 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by brunoviveiros, 08-04-2020, 09:36 AM
        3 responses
        36 views
        0 likes
        Last Post ATMtrader0001  
        Started by DieSlower, Yesterday, 09:46 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Working...
        X