Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

need an advice on OnExecution method during optimalization

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

    need an advice on OnExecution method during optimalization

    Hello,
    when I optimize my script version 0, all instruments in my instrument list are optimized, but since NT gets unstable and I need the results, then we wrote this logging for each trade which creates separate csv file for each settings of optimization and writes settings for it, So this created version 1, but when I optimize it then only few assets gets optimized (sometimes 5, sometimes 30, but never all 53). All optimizations end with this error:

    Error on calling 'OnExecution' method for strategy 'ACEriaV01All/76fddd85b1674fac9a73de8cb8218798': Odkaz na objekt není nastaven na instanci objektu.

    Translation:
    (Link is not set on object's instance OR Object reference not set to an instance of an object)

    This happens sometimes in tens of minutes sometimes after many hours of test running and writing results in csv files (and then when it ends it will show what it has optimized in NT).

    Do you have any idea how to solve these unpredictable interruptions of optimization?

    May the external connection enabled help (just newest idea which to test would take about 1-2 days and now I want to save precious time by asking)?

    Thank you in advance for any tips
    N.

    #2
    Hello Nicknamed,

    We can only suggest the usual debugging approaches here. Use plenty of print statements, and try catch blocks to get more information regarding the error.
    Using Try-Catch Blocks

    If you have the opportunity, hooking up to the visual studio debugger may be helpful as well.


    The error message sounds like it's trying to access an invalid object. This article may help with making necessary null reference checks:
    Checking for Null References
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanx for the tips, we already tried those tips and so far found nothing that would solve the problem but we will continue in doing that .......

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      53 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      32 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      5 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      19 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      6 views
      0 likes
      Last Post cre8able  
      Working...
      X