Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

optimize for consecutive losses

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

    optimize for consecutive losses

    hi
    is there a way to optimize for minimum consecutive losses, I have checked all the options on the optimizer engine, but couldn't find anything for it or anything similar.

    i found a method for consecutive losses.
    Code:
    SystemPerformance.AllTrades.TradesPerformance.MaxConsecutiveLoser
    how would I go about to create a new optimizer factor (Min consecutive losses)

    #2
    Hello maaz1598,

    What you could do is open the NinjaScript Editor under the Control Center >New>NinjaScript Editor, scroll down to Optimization Fitness foulder, double click on any existing file within the folder. Then right click in the editor>save as, and select a name.

    Within the code you would comment out the existing value= line and write a new Value= line, in your case you could swap out,

    Code:
    Value = strategy.SystemPerformance.AllTrades.TradesPerformance.Percent.Drawdown;
    With,

    Code:
    Value = strategy.SystemPerformance.AllTrades.TradesPerformance.MaxConsecutiveLoser;
    Then right click and compile.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X