Strategy Creation
One script, every combination.
One script runs the whole creation directly on all three assets, NAS100, US30 and SP500, backtesting the full grid on both brokers in a single pass.
import numpy as np ASSETS = ["NAS100", "US30", "SP500"] # created in one run for asset in ASSETS: candles = load(asset) # real market data, both brokers for mode, fast, slow in grid: # every trigger rebuilt on the whole array at once signal = moving_average_cross(candles, mode, fast, slow) for sl, rr, dur in combos: result = backtest(candles, signal, sl, rr, dur) # kept only if it clears the benchmark on both brokers if passes(result): write_strategy(asset, mode, fast, slow, sl, rr, dur)
What the script does
Loads one asset's candles, rebuilds every trigger, backtests the range of parameters of the strategy, and keep what pass the filters.
The Strategy Parameters
The total ammount of strategy created is generated from the combination of every dimension below, which is why the number of tested strategies grows into the millions and above.
Trigger families: What decision take the strategy to open a trade.
Execution timeframe and an optional confirmation timeframe on a higher horizon.
Risk: the risk strategy used, the stop loss distance and take profit expressed as a multiple of the stop loss.
Time windows in Rome time (or every time we want) from the full day to single sessions.