strategy-config-safe_skill

This skill guides safe parameter updates for NinjaTrader strategies, preventing execution logic changes while adjusting stops, targets, ATR multipliers, and
  • C#

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill mkalhitti-cloud/universal-or-strategy --skill strategy-config-safe

  • SKILL.md8.7 KB

Overview

This skill provides a safe parameter update protocol for NinjaTrader 8 strategies, focused on stops, targets, ATR multipliers, and any State.SetDefaults values. It enforces separation between configuration and execution to prevent accidental logic changes that introduce bugs. Use it to validate, test, and deploy parameter tweaks without touching execution code.

How this skill works

It inspects and validates that every user-configurable value lives in State.SetDefaults and is annotated with NinjaScriptProperty and Range attributes. The workflow includes pre-update checks, changing defaults only, automated validation rules (bounds, logical relationships, ATR availability), and a staged testing protocol from compilation to sim and live monitoring. It also defines an isolation protocol and rollback steps if a parameter change breaks behavior.

When to use it

  • Changing StopLossATRMultiplier, Target1/Target2 ATR multipliers
  • Modifying ATRPeriod or any ATR-based distance
  • Adjusting session timing (SessionStartTime, SessionEndTime, ORWindowMinutes)
  • Altering position sizing parameters (ContractsPerAccount)
  • Any edit to the State.SetDefaults block

Best practices

  • Only edit defaults in State.SetDefaults; never modify OnBarUpdate or order submission code during parameter updates
  • Declare properties with [NinjaScriptProperty] and [Range] and validate bounds on change
  • Cache ATR once per bar and reference cached value everywhere to avoid inconsistencies
  • Run compile, Strategy Analyzer, and at least one week of sim before live deployment
  • Maintain a parameter change log and keep the previous working values available for immediate rollback

Example use cases

  • Tighten stops from StopLossATRMultiplier=2.0 to 1.5 and validate on 3 months historical data in Strategy Analyzer
  • Increase Target2ATRMultiplier and verify Target2 > Target1, backtest reachability and trailing stop interaction
  • Change ATRPeriod from 14 to 20, update BarsRequiredToPlot and confirm cached ATR recalculation
  • Adjust ORWindowMinutes and ensure it fits within RTH session and SessionEndTime > SessionStartTime
  • Increase ContractsPerAccount and validate maxLoss vs account daily loss limit

FAQ

Treat that as a new feature. Open a separate change, update execution code in a controlled branch, write unit tests and run full validation; do not combine with a parameter-only update.

How do I verify ATR-based distances updated correctly?

Ensure ATRPeriod is updated in SetDefaults, confirm cachedATR uses the new period in OnBarUpdate, run backtests and check distance calculations on sample bars.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational