Calling an Optimization in a Strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Calling an Optimization in a Strategy
Updated: Views / Replies:4,237 / 17
Created: by serac Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Calling an Optimization in a Strategy

  #1 (permalink)
Elite Member
Arizona, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: MB Trading
Favorite Futures: Cello
 
serac's Avatar
 
Posts: 116 since Jan 2011
Thanks: 321 given, 137 received

Calling an Optimization in a Strategy

Hi all,

This is my first non-introduction post. I am a bit surprised this hasn't been asked (to the best of my knowledge).

In NT7, is it possible to call an optimization from within a strategy? Just to be clear, I am not talking about a walkforward optimization.

What I would like to do is to have some parameters change in time as part of an optimal-adaptive strategy. Suppose, say, on each bar update, take the last N bars, and find parameters A, B, and C via the NT7 GA that are optimal in some sense. At the moment I am not concerned with over-fitting, or overcomplication. I just want to know if it can be done.

Has anyone tried this?

Thanks!

Daniel (serac)

Reply With Quote
The following user says Thank You to serac for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received



serac View Post
Hi all,

What I would like to do is to have some parameters change in time as part of an optimal-adaptive strategy. Suppose, say, on each bar update, take the last N bars, and find parameters A, B, and C via the NT7 GA that are optimal in some sense. At the moment I am not concerned with over-fitting, or overcomplication. I just want to know if it can be done.
Daniel (serac)

Hi Daniel,

Congratulations on a very unclassic approach! From my point of view, knowing that GA optimization can take significant resources that I would NOT want to incur on a trading computer during trading, I have a suggestion:

1. Setup another computer as your GA optimizer: you will have to guarantee dat consistency between that and your trade computer
2. Write-out the results to a shared text file of the paramters that you optimized and need to modify
3. Read that text file into your trading computer strategy during OnBarUpdate:
https://futures.io/free_downloads/ninjatrader-7/indicators/631-download.html?view

No, I havent done it, but I think I think it amy be doable. My main concern is maintaining a good computing environment for that imnportant trading machine.

TJ

Reply With Quote
The following user says Thank You to Trader.Jon for this post:
 
  #4 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,574 given, 3,982 received

I agree with @Trader.Jon, but something smarter communicate with something else than a file is maybe better (sockets for example).

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #5 (permalink)
Elite Member
Arizona, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: MB Trading
Favorite Futures: Cello
 
serac's Avatar
 
Posts: 116 since Jan 2011
Thanks: 321 given, 137 received

Ha! You really think it is that unusual of an approach? From my background it isn't that unusual or new at all (which makes my surprise that this is unusual all the more). My completely uneducated guess is that the big institutional algorithmic traders certainly do something like this.

But, you bring up a good point. Stability is important, and an embedded optimization would not increase stability. A proof-of-concent may be to run another instance of NT on the same machine, and use the text file transfer. That may work (as unelegant as it is).

I may look into the third-party NT7-compatible GA I saw on this forum. Wonder if it is invoke-able from a strategy?

Thanks for your reply. You got me thinking...



Trader.Jon View Post
Hi Daniel,

Congratulations on a very unclassic approach! From my point of view, knowing that GA optimization can take significant resources that I would NOT want to incur on a trading computer during trading, I have a suggestion:

1. Setup another computer as your GA optimizer: you will have to guarantee dat consistency between that and your trade computer
2. Write-out the results to a shared text file of the paramters that you optimized and need to modify
3. Read that text file into your trading computer strategy during OnBarUpdate:
https://futures.io/free_downloads/ninjatrader-7/indicators/631-download.html?view

No, I havent done it, but I think I think it amy be doable. My main concern is maintaining a good computing environment for that imnportant trading machine.

TJ


Reply With Quote
 
  #6 (permalink)
Elite Member
Arizona, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: MB Trading
Favorite Futures: Cello
 
serac's Avatar
 
Posts: 116 since Jan 2011
Thanks: 321 given, 137 received


sam028 View Post
I agree with @Trader.Jon, but something smarter communicate with something else than a file is maybe better (sockets for example).

Ah, good idea. However, anything beyond a text file is certainly beyond my current capabilities. If the text file thing works, then a more stable method of communication would certainly be desirable!

Reply With Quote
 
  #7 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received


sam028 View Post
I agree with @Trader.Jon, but something smarter communicate with something else than a file is maybe better (sockets for example).

sam,

I would tend to agree that might be more practical if multiple instruments are in motion ... a file does have the distinction of being archival and also potential to be used for further development.

Jon

Reply With Quote
 
  #8 (permalink)
Elite Member
Dartmouth NS
 
Futures Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker/Data: IB / IQFeed / Kids
Favorite Futures: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 459 received

Coincidentally I thought about such an approach a week ago or so in the context of implementing an Encog-framework neural net (NN) -based strategy for NinjaTrader ("NT") -- not that I've developed a worthwhile NN-based strategy yet. By default the Encog configuration offloads training from any NN-based indicator or strategy to a separate C# (or Java) application IIRC mainly because of the processing burden.

I also agree the best approach may be sockets and poked around CodeProject.com a little to see what's involved. In brief it appears doable, the approach being to develop a DLL, refer to it in the NT NN-based indicator or strategy and periodically invoke the separate application with a training set via the DLL.

It may be also be possible (perhaps more reasonable) to work the other way around; namely, broadcast optimized parameters through a socket from a "server" training/optimization app (possibly including NT's strategy optimizer if the socket interface were embedded in the strategy), to be picked up by a live "client" strategy.

I'm not sure if it's an issue but one might have to be careful not to breach any rules regarding redistribution of data provided by a 3rd party.

Reply With Quote
The following 2 users say Thank You to bnichols for this post:
 
  #9 (permalink)
Elite Member
Tonganoxie, Kansas
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: CL,6E
 
gordo's Avatar
 
Posts: 160 since Nov 2009
Thanks: 129 given, 399 received

How do I get the downloaded OptimizerType files to show up in the drop down menu? I copied the file into NinjaTrader7/bin/Custom/Type...now what???

Thanks.
Gordo

Reply With Quote
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received



gordo View Post
How do I get the downloaded OptimizerType files to show up in the drop down menu? I copied the file into NinjaTrader7/bin/Custom/Type...now what???

Thanks.
Gordo

Restart Ninja.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Reply



futures io > > > > > Calling an Optimization in a Strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIDEO: MultiCharts vs. NinjaTrader strategy backtesting and optimization Big Mike MultiCharts 53 June 12th, 2016 02:34 PM
Gold - I'm calling the top cpi65 Commodities Futures Trading 65 February 19th, 2012 05:32 AM
Strategy Optimization and trusting the results petronick Elite Automated NinjaTrader Trading 11 July 31st, 2011 02:50 AM
Calling GomiCD into GomiLadder kashter NinjaTrader Programming 2 May 9th, 2011 07:35 PM
Combining strategy optimization types caprica NinjaTrader Programming 0 July 27th, 2009 05:52 AM


All times are GMT -4. The time now is 06:50 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-16 in 0.15 seconds with 19 queries on phoenix via your IP 54.145.16.43