Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing TickSize from a custom optimization result

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

    Accessing TickSize from a custom optimization result

    OK, I made a little file called Expectancy.cs in my bin\Custom\Type folder. It works as expected, and I can access that optimization result in the Strategy Analyzer. Well and good.

    What I really want to do here is find the average winning trade and average losing trade that excludes "scratch trades" that won or lost just a tick or two. The canned calculations don't do this.

    There's no IntelliSense available to me when I edit this file, so I don't know how (or if) it's possible to access the TickSize of my strategy from within that file. I also don't know if it's possible to get a collection of trades so that I can exclude those that win or lose a tiny amount.

    Also, would my Expectancy.cs file be executed only once at the end of each optimization iteration, or also on each bar? This matters if I have a time consuming loop in there.

    Finally, it would be really great if there was some way to feed a result calculated from within my strategy to the Strategy Analyzer for ranking. I don't see how that's possible though.

    -Alex
    Last edited by anachronist; 05-21-2012, 07:03 PM.

    #2
    Hi Alex, creating and working with custom optimization types would unfortunately be nothing we could support here - you should be able to access the Performance class and Trade collection though.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    320 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    203 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    190 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    283 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    238 views
    0 likes
    Last Post CarlTrading  
    Working...
    X