• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

backtest / optimization exposed to ninjascript

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

  • GrumpyTrader
    replied
    Here is as far as I got with programically running a backtest. The problem is at calling the InitializeBars on the NinjaScriptBase method of a strategy. I get the callback but the bars aren't initialized. I can't step into the code so no way for me to figure out the issue. Perhaps someone else following this thread can take a look and has some ideas of what to try.
    Attached Files

    Leave a comment:


  • GrumpyTrader
    replied
    Thanks Brett. Give's me a research project. :-)

    Leave a comment:


  • NinjaTrader_Brett
    replied
    GrumpyTrader,

    Once I get to a production release I would be able to look more heavily into official supported such steps. Either by being able to document all the steps properly or providing some 'wrapper' method call you could make to just do the Backtest/Optimization. Until then this would be unsupported since there are several steps you have to do in the right order to get an optimization to run.

    As for a hint that you could look into if you did want to chase it further on your own... the trigger point is "RunOptimization()" method in NinjaTrader.Core.StrategyBase. Before you call that method on a strategy instance you must first setup any bars using InitializeBars() on that strategy instance. That is as far as I could comment until we get through beta and make a determination on how the above will change as we look into potentially officially supporting that use case.

    Leave a comment:


  • GrumpyTrader
    replied
    Hey Brett,
    I was wondering if you could share some information on how to do this (even though it is unsupported). I'm at the point now with the AddOn i've been working on that I either use the built in optimizer or create my own. I completely understand if you can't support it but I think I will be able to figure it out if you just point me in the right direction.

    Leave a comment:


  • GrumpyTrader
    replied
    Thanks Brett,
    I completely understand and agree. Perhaps after NT8 is released you could revisit it as I do think it would allow for very interesting addon's.

    Leave a comment:


  • NJA_MC
    replied
    Originally posted by Dionysus View Post
    I have to 'second' this as something that could be very helpful indeed, and appreciate your looking into this, Brett (and your mentioning it, Grumpy!)
    I will third it, but certainly a stable NT8 release is a higher priority for me and the NT community.

    Leave a comment:


  • NinjaTrader_Brett
    replied
    Wanted to provide an update that the Running of an optimization isn't exceedingly difficult, however setting up a fresh strategy to feed the optimizer correctly is more involved. As such I may not be able to support this. I'll spend some more time looking at the complexity involved and get back but will require additional time and is lower priority then other beta tasks we have ongoing so will take me additional time.

    Thanks for your patience.

    Leave a comment:


  • Dionysus
    replied
    I have to 'second' this as something that could be very helpful indeed, and appreciate your looking into this, Brett (and your mentioning it, Grumpy!)

    Leave a comment:


  • NinjaTrader_Brett
    replied
    Some but not ready to post yet, likely be next week.

    Leave a comment:


  • GrumpyTrader
    replied
    Originally posted by NinjaTrader_Brett View Post
    We definitely exposed programming custom optimizers, optimization fitnesses, and performance metrics however the act of actually running your own optimization we did not discuss during initial development.

    You bring up a very interesting idea and I see no reason so far why we wouldn't allow that currently.

    I'll do some research and throw together some Add On documentation on the topic if I'm able to support it. Give me a few days to get everything together and I'll repost.
    Hey Brett,
    I was wondering if you made any headway on this?

    Best
    GT

    Leave a comment:


  • MicroTrends
    replied
    Originally posted by GrumpyTrader View Post
    Will it be possible in NT8 to backtest stategies and run the optimizer through ninjascript?

    The reason I ask, is I wanted to integrate a custom built application that does the following:
    a) semi-automated optimizations
    b) multi-system optimizations
    c) strategy ranking application

    If those objects were exposed I would be able to leverage the NT8 optimization engine instead of having a custom solution.
    Yes very good + the ability to save out and rank performance settings and re-run then as templates for a universe of instruments - and remove the parameter overwriting when parameters do not change 1;1;1 etc 0- the data then can be saved locally or uploaded to a remote repository - as json, xml or csv results or settings xml files etc

    Leave a comment:


  • GrumpyTrader
    replied
    That would be terrific Brett !

    Leave a comment:


  • NinjaTrader_Brett
    replied
    We definitely exposed programming custom optimizers, optimization fitnesses, and performance metrics however the act of actually running your own optimization we did not discuss during initial development.

    You bring up a very interesting idea and I see no reason so far why we wouldn't allow that currently.

    I'll do some research and throw together some Add On documentation on the topic if I'm able to support it. Give me a few days to get everything together and I'll repost.

    Leave a comment:


  • GrumpyTrader
    started a topic backtest / optimization exposed to ninjascript

    backtest / optimization exposed to ninjascript

    Will it be possible in NT8 to backtest stategies and run the optimizer through ninjascript?

    The reason I ask, is I wanted to integrate a custom built application that does the following:
    a) semi-automated optimizations
    b) multi-system optimizations
    c) strategy ranking application

    If those objects were exposed I would be able to leverage the NT8 optimization engine instead of having a custom solution.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Wick Wrangler, Today, 12:42 AM
1 response
18 views
0 likes
Last Post NinjaTrader_Kate  
Started by pman777, 04-15-2020, 05:09 AM
4 responses
43 views
0 likes
Last Post valhallafutures  
Started by cliffhu, Today, 10:59 AM
1 response
13 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by Slaywer, Today, 05:17 AM
2 responses
13 views
0 likes
Last Post Slaywer
by Slaywer
 
Started by billythekid72, Today, 10:55 AM
2 responses
10 views
0 likes
Last Post billythekid72  
Working...
X