Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Trades in OptimizationFitness

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

    Accessing Trades in OptimizationFitness

    2 questions:

    a) can I access the underlying trades OnCalculatePerformanceValue in an optimization fitness script? The AllTrades property seems to be empty when I step through it in the debugger. (it wasn't always that way was it?)

    b) StdDev in TradesPerformance object is represented on a per unit basis which doesn't help me as I'm looking for the stddev of the trade profit in currency. I was trying to calculate it myself (see a) above) but I can't figure out how to access the underlying trades.

    #2
    Hello,

    The OnCalculatePerformanceValue() is called in the script and allows you to set the value. Behind the scenes NT will call this method when performing the individual backtests to generate a performance rating for ranking for each test.
    (For example you could get a print for each optimization in the output window)



    If you are asking if you are able to access this from VisualStudio, this would be outside of what I am able to support.

    Attached is an example that loops through the trades and prints these to the output window.
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,
      When I step through each OnCalculatePerformanceValue() call, the strategy.SystemPerformance.AllTrades collection isn't always populated. I believe this is a bug. Can you confirm you are seeing the same thing? I've attached the fitness method which prints to the output screen the details.
      Attached Files
      Last edited by GrumpyTrader; 04-09-2017, 09:08 PM.

      Comment


        #4
        Hello GrumpyTrader,

        I was able to reproduce and I have reported the behavior to our development.

        Thanks for reporting the behavior.

        Once I have a tracking ID for this report I will post in this thread for future reference.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi GrumpyTrader,

          I have received a tracking ID for this behavior where not all iterations are appearing when the Optimization Fitness is run.

          For future reference, this behavior is being tracked with ID #NTEIGHT-11564.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by arvidvanstaey, Today, 02:19 PM
          4 responses
          11 views
          0 likes
          Last Post arvidvanstaey  
          Started by samish18, 04-17-2024, 08:57 AM
          16 responses
          61 views
          0 likes
          Last Post samish18  
          Started by jordanq2, Today, 03:10 PM
          2 responses
          9 views
          0 likes
          Last Post jordanq2  
          Started by traderqz, Today, 12:06 AM
          10 responses
          18 views
          0 likes
          Last Post traderqz  
          Started by algospoke, 04-17-2024, 06:40 PM
          5 responses
          48 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X