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:	243
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:	204
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

    #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 Rapine Heihei, Today, 08:25 PM
        0 responses
        2 views
        0 likes
        Last Post Rapine Heihei  
        Started by Rapine Heihei, Today, 08:19 PM
        0 responses
        1 view
        0 likes
        Last Post Rapine Heihei  
        Started by f.saeidi, Today, 08:01 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 07:51 PM
        0 responses
        5 views
        0 likes
        Last Post Rapine Heihei  
        Started by frslvr, 04-11-2024, 07:26 AM
        5 responses
        96 views
        1 like
        Last Post caryc123  
        Working...
        X