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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X