i use M1 data and 20yrs old of data range. too high or its ok? cuz i need to build once and leave it ran live a long period

Using M1 data and a 20-year range for backtesting in StrategyQuant X is a solid choice, especially if your goal is to build a strategy that will run live for a long period with minimal adjustments. However, there are a few considerations to keep in mind:

Pros of Using M1 Data and a 20-Year Range:

  1. Accuracy in Backtesting:

    • M1 data provides the most granular view of price action, capturing every minute’s high, low, open, and close. This is beneficial for building a precise strategy, especially for exit strategies where timing is critical, such as in trailing stops or scalping.
    • A 20-year range provides a robust historical dataset that includes multiple market conditions (bullish, bearish, and volatile periods), allowing your strategy to adapt to different scenarios.
  2. Long-Term Viability:

    • Since you want a strategy that can be used live for a long period, backtesting across 20 years ensures that your strategy is tested across various market cycles (e.g., financial crises, economic booms, geopolitical events).
    • This can give you confidence that your strategy is not curve-fitted to short-term conditions and will be resilient over time.
  3. Diverse Market Phases:

    • Gold’s price action has changed significantly over the last 20 years. Testing your strategy on such a broad range of data ensures it performs well across different market environments (low volatility periods, high volatility during economic turmoil, etc.).

Cons and Considerations:

  1. Computational Load:

    • M1 data over 20 years is a lot of data. This will significantly increase the computational load, both in terms of time and processing power needed for backtesting, especially when using genetic algorithms.
    • Make sure you have the necessary hardware resources or adjust the size of the test (e.g., use fewer strategies in the genetic evolution process, optimize parameters over smaller chunks of data).
  2. Overfitting Risk:

    • With such a large dataset, there is always a risk of overfitting—where your strategy performs well in backtests but doesn’t generalize well in live trading.
    • Solution: Ensure you are using proper out-of-sample testing and walk-forward optimization to mitigate overfitting. This way, you can verify the strategy’s robustness over unseen data.
  3. Execution in Live Markets:

    • M1 data focuses on short-term fluctuations. While this provides precision in backtesting, your strategy may encounter slippage and latency issues in live trading due to the speed of executions required for minute-based strategies, especially in a fast-moving asset like gold.
    • Ensure that you take these factors into account when building your risk management rules.
  4. Historical Relevance:

    • Although 20 years of data ensures you cover a broad range of market environments, some past market conditions may no longer be relevant to current trading. For instance, gold's behavior during the early 2000s might not reflect its price action post-2015.
    • Solution: While you can still backtest over 20 years, pay close attention to how the strategy performs in the last 5–10 years of data, as these periods reflect more recent market conditions.

Recommended Approach:

  1. Use Data Segmentation:

    • You can break the 20-year period into different segments during backtesting:
      • In-sample (Training Period): The first 15 years of data.
      • Out-of-sample (Validation Period): The last 5 years.
    • This will allow you to refine your strategy on the first segment of data and validate its robustness on more recent market conditions.
  2. Walk-Forward Testing:

    • Instead of testing the entire 20-year period as a single block, consider using walk-forward optimization to evaluate how well your strategy adapts to changing market conditions over time. This will ensure that it’s not just performing well in hindsight, but would have adapted dynamically in the real market.
  3. Genetic Evolution with M1 Data:

    • When using genetic evolution on M1 data, it’s important to limit the complexity of the strategy (number of indicators, entry/exit rules) and avoid evolving too many parameters at once. This will help reduce the computational burden and minimize overfitting.
  4. Live Testing:

    • After backtesting, use a small account or demo to test the strategy in live conditions for a few weeks to verify its real-world performance. Factors like execution speed, slippage, and broker conditions can impact performance differently than in backtesting.

Final Thoughts:

  • M1 data and a 20-year range is definitely not "too much" if your goal is to create a long-term, robust trading strategy. Just ensure that you optimize it efficiently using techniques like walk-forward optimization and out-of-sample testing.
  • Focus on building a strategy that is robust and adaptive rather than highly optimized for one specific condition, and it should serve you well over the long term in live trading.