forex software

Create and Test Forex Strategies

forex software

express-generator:forward-testing

Forward Testing

Forward Testing validates strategies on unseen data after the main in-sample calculations.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Forward testing          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Validate strategies on new unseen data.
use_forward_testing = false

; Number of bars loaded before the forward-test segment.
; 0 keeps the default behavior.
preload_data_bars   = 0

What it controls

  • use_forward_testing enables or disables forward testing.
  • preload_data_bars sets the number of bars to preload before the forward-test start.

How the forward segment is chosen

When forward testing is enabled, backtesting starts from each strategy's update time. In practical terms, bars before that point are not used for trade entries in the forward-test run.

If preload_data_bars is greater than 0, Generator loads extra history before the start point so indicators have context. Values above 0 are treated with a minimum preload of 300 bars.

Typical usage

Enable forward testing with a preload window:

use_forward_testing = true
preload_data_bars   = 500

Run from command line:

node ./bin/gen.js --use-forward-testing true --preload-data-bars 500

Notes

  • Forward testing is configured separately from Data Horizon and Out of Sample settings.
  • Data Horizon and Out of Sample are applied first, then forward-testing logic is applied inside that range.
  • Use this section together with strict Acceptance Criteria when validating robustness.