NexusFi: Find Your Edge


Home Menu

 





OptimizationMethod.Iterations is always 1


Discussion in NinjaTrader

Updated
    1. trending_up 1,499 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

OptimizationMethod.Iterations is always 1

  #1 (permalink)
 dnof 
san francisco, ca
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 45 since Nov 2009
Thanks Given: 42
Thanks Received: 27

So I have a related question I am trying to solve.

With my strategy I am exporting trade records and performance metrics automatically to two csv files. I have it setup for multi-threaded support and it is works great running in the optimizer. To support ppart of this, I am using some "static" variables for the output file names. These file names are automatically calculated based on instrument and time etc.

The issue I have is that because of the use of statics, the filename does not reset for each new optimization run so I have to manually "move them out of the way".

What I was hoping to do was detect when an optimization was being performed and then using the expected number of iterations (using the base.OptimizationMethod.Iterations) track until I am complete and then reset the static file name.

I would have thought that this OptimizationMethod.iterations property (at least looking at the defaultOptimization code should represent the number of iterations that are required to be performed (i.e. a total count), but when I look at this variable it is always one from within a strategy instances.

Anyone have any ideas on if I am being boneheaded or is there something else I am do instead??

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,537


I can't offer much help, other than to point you towards some other extensive work with optimizers:



Now that code is for 6.5, and is useless for 7 in terms that it won't work. But, you could still analyze the code and possibly learn a few things to do with using your own optimizer.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 dnof 
san francisco, ca
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 45 since Nov 2009
Thanks Given: 42
Thanks Received: 27

Thanks Mike,

I emailed NT also, but it does not seem like there is an easy method inside a Strategy. I could extend/write my own optimizer, which is likely the easiest at stage.

In the interim what I have done is created a "static" that tracks whether a "file name reset" is required, and then just set that to the true in the UI. This works fine, the only issue being that if you forget, you add/overwrite the last files.

Started this thread Reply With Quote




Last Updated on October 5, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts