Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

f optimizer development - no values returned

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

    f optimizer development - no values returned

    I'm in the process of developing an optimizer, the code compiles correctly but nothing is displayed in the strategy analyzer. The code isn't completely finished but it should be able to return at least one value. NT6 shows nothing and NT6.5 says that there is no info to display. The code is attached.

    Thanks,
    Chris
    Attached Files

    #2
    I didn't examine your logic in any depth, but I'd do two things:

    1) Check to make sure you're not getting a divide by zero (it looks likely -- did you look in the "Log" tab for errors?)

    2) If still having troubles, try writing some intermediate results to a text file using C# I/O methods.

    Good luck.

    Comment


      #3
      I'll take a quick look. Note you can use Strategy.Print() to write debug info to the output window.

      Comment


        #4
        It returns results for me as expected (on 6.5 beta 4), but your logic doesn't make sense, in particular:

        1. TWR *= HPR; TWR is always zero, so this value is always going to be zero.

        2. This section:
        Loser = systemPerformance.ShortTrades.TradesPerformance.Gr ossLoss;
        largestLoser = systemPerformance.LongTrades.TradesPerformance.Gro ssLoss;

        if(largestLoser >Loser)
        {
        largestLoser = Loser;
        }

        The gross loss is the total of all losing trades, and it is a negative number. This logic is not going to do what you think.

        But I am not getting the no results message. KBJ is probably right about there being an exception.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        1 view
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        1 view
        0 likes
        Last Post 00nevest  
        Started by Jonafare, 12-06-2012, 03:48 PM
        5 responses
        3,986 views
        0 likes
        Last Post rene69851  
        Started by Fitspressorest, Today, 01:38 PM
        0 responses
        2 views
        0 likes
        Last Post Fitspressorest  
        Started by Jonker, Today, 01:19 PM
        0 responses
        2 views
        0 likes
        Last Post Jonker
        by Jonker
         
        Working...
        X