strategy-config-safe

Validate NinjaTrader parameter updates in State.SetDefaults.

2|3|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/mkalhitti-cloud/universal-or-strategy --skill strategy-config-safe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategy-config-safe
Source: https://github.com/mkalhitti-cloud/universal-or-strategy/tree/main/.agent/skills/strategy-config-safe
Command: npx skills add https://github.com/mkalhitti-cloud/universal-or-strategy --skill strategy-config-safe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This policy prevents unintended changes to NinjaTrader strategy execution when updating parameters, by ensuring edits are isolated to the parameter defaults and do not touch runtime logic.

Core Features & Use Cases

  • Enforces parameter-only edits in State.SetDefaults to keep execution paths intact.
  • Validates parameter relationships (e.g., Target2 ATR multiplier must be greater than Target1 and StopLoss must be positive).
  • Guides a repeatable, auditable workflow for safe parameter changes across NinjaTrader strategies.

Quick Start

  1. Identify all user-configurable parameters living in State.SetDefaults (e.g., StopLossATRMultiplier, ATRPeriod, Target multipliers, ORWindowMinutes).
  2. Update only those parameters in State.SetDefaults, avoiding changes to OnBarUpdate or other execution code.
  3. Compile, run Strategy Analyzer on historical data, and perform a controlled simulation before deploying live.

Frequently Asked Questions about strategy-config-safe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely update NinjaTrader strategy parameters without breaking execution logic?

To safely update NinjaTrader strategy parameters, only modify defaults within State.SetDefaults and avoid touching OnBarUpdate or execution code. This isolation prevents unintended changes to runtime logic while adjusting inputs like StopLossATRMultiplier or ATRPeriod.

What is the correct workflow for changing NinjaScriptProperty attributes in State.SetDefaults?

The correct workflow for changing NinjaScriptProperty attributes involves four steps: identify the parameter zone in State.SetDefaults, perform pre-update validation, apply the safe change, and conduct post-update validation. This ensures parameter relationships remain valid and auditable.

Why do my NinjaTrader strategy parameter updates cause unintended execution changes?

NinjaTrader strategy parameter updates cause unintended execution changes when edits extend beyond State.SetDefaults into runtime logic like OnBarUpdate. Keeping modifications isolated to parameter defaults defined with NinjaScriptProperty prevents altering execution paths.

What validation rules apply to NinjaTrader ATR multipliers and StopLoss parameters?

Validation rules for NinjaTrader ATR multipliers require Target2 multiplier to exceed Target1, and StopLossATRMultiplier must remain positive. These relationship checks ensure parameter configurations stay within safe boundaries during State.SetDefaults updates.

Can I change ORWindowMinutes and Target multipliers in NinjaTrader strategies without affecting live execution?

You can change ORWindowMinutes and Target multipliers without affecting live execution by restricting edits to State.SetDefaults. After updating, compile the strategy and run Strategy Analyzer on historical data to perform a controlled simulation before live deployment.

What are the limitations of updating parameters only in State.SetDefaults for NinjaTrader strategies?

Limitations of updating parameters in State.SetDefaults include the inability to modify runtime execution logic or OnBarUpdate behavior. This approach strictly covers user-configurable parameters like ATRPeriod and StopLossATRMultiplier, requiring separate handling for any logic changes.