DNYL . SPACE

As motivation plays a crucial role in reaching these goals.

Day: November 16, 2024

Portfolio Creation IS/OOS.

For filtering strategies in In-Sample (IS) and Out-of-Sample (OOS) phases, here’s how you should approach it to ensure long-term stability:

Both IS and OOS performance are critical, as they provide insight into how the strategy performs in known market conditions (IS) and unseen market conditions (OOS). The goal is to ensure the strategy generalizes well beyond the backtested data.

Make sure your dataset has been divided into In-Sample (IS) and Out-of-Sample (OOS) parts. IS is used for training or optimization, while OOS is used to test the strategy’s robustness.

  • OOS performance is more important than IS because it demonstrates how the strategy handles real, unseen market conditions. Always filter strategies that have both IS and OOS results, but give more weight to OOS metrics to ensure robustness.

To set up your filters and ranking criteria for both IS and OOS, here’s how to prioritize:


1. Sharp Raio (OOS > IS)1. Sharpe Ratio (OOS > IS)

  • IS: Should be > 1.5. A high IS Sharpe Ratio indicates good performance in training data.
  • OOS: This should be your priority and should ideally be > 2. It shows strong performance with minimal volatility in unseen data.
  • Why: If OOS Sharpe is much lower than IS, the strategy may be overfit. The OOS Sharpe Ratio >2 confirms the strategy can handle real-world volatility.

2. CAGR/Max DD% (OOS > IS)

  • IS: Should be > 1, but OOS should be higher than IS.
  • OOS: Should be prioritized here as it shows the return achieved per unit of drawdown in unseen market conditions. Aim for > 1.
  • Why: Ensuring the OOS CAGR/Max DD% is strong proves that the strategy will continue to generate healthy returns with manageable risk.

  • IS: Look for > 1.5 to ensure profitability in known data.
  • OOS: Should ideally be close to IS performance. Aim for > 1.5, and if OOS is significantly lower, be cautious.
  • Why: Large gaps between IS and OOS profit factor indicate potential overfitting.

4. Return/Drawdown Ratio (Ret/DD) (OOS > IS)

  • IS: Should be > 2.
  • OOS: Should be comparable or better than IS, ideally > 2. If OOS Ret/DD drops too much compared to IS, the strategy may not generalize well.
  • Why: This helps you assess the balance of returns versus risk in unseen conditions. Favor strategies where OOS Ret/DD is consistent with IS.

  • IS: Should be > 0.8 to indicate a stable equity curve in the training data.
  • OOS: Should be close to IS. Significant drops here mean the strategy is less reliable in real conditions.
  • Why: High stability in OOS ensures the strategy performs smoothly without wild fluctuations in live trading.

  • IS: Set the threshold < 15% to limit exposure in known conditions.
  • OOS: This should be the same or lower than IS to ensure the strategy doesn’t take on too much risk when live. Prioritize < 10-12% for OOS.
  • Why: You want to reduce risk in live markets, so OOS drawdown should ideally be lower than IS.

  • IS: Set a threshold < 20-25%.
  • OOS: Should be the same or lower than IS to avoid risk spikes in live trading. < 20% is preferable.
  • Why: Keeping OOS max drawdown low is critical to ensuring the strategy doesn’t suffer big losses in real-world conditions.

  • IS: Look for solid net profit but not at the expense of risk.
  • OOS: Should be close to IS. If OOS profit is significantly lower than IS, this could be a sign of overfitting.
  • Why: The goal is to ensure consistent profitability across both IS and OOS phases.

  • IS: Look for R² to indicate a strong trend, but don’t prioritize it too heavily.
  • OOS: Should be close to IS values. Large differences could signal instability in the equity curve.
  • Why: R² helps in assessing whether the strategy maintains its trend in unseen data.

10. Consecutive Win/Loss Trades (OOS > IS)

  • IS: Avoid strategies with large streaks of losses.
  • OOS: Should be comparable to IS, and you want to avoid any strategies where the number of consecutive losses is much higher in OOS.
  • Why: A strategy that maintains its win/loss consistency across IS and OOS will be more robust.

  1. Sharpe Ratio (OOS > IS)
  2. CAGR/Max DD% (OOS > IS)
  3. Return/Drawdown Ratio (Ret/DD) (OOS > IS)
  4. Profit Factor (OOS close to IS)
  5. Stability (OOS close to IS)
  6. Open Drawdown % (OOS < IS)
  7. Max Drawdown % (OOS < IS)
  8. Net Profit (OOS close to IS)
  9. Consecutive Win/Loss Trades (OOS > IS)
  10. R-Squared (R²) (OOS close to IS)

When filtering and ranking strategies, OOS performance should take precedence over IS, as it reflects the strategy’s performance in live, unseen market conditions. Always ensure that OOS metrics are close to or better than IS to confirm the robustness of your strategy, particularly Sharpe Ratio, CAGR/Max DD%, and Ret/DD.

What should I filter and rank Priority?

In phase 1, which says to create 4-6 portfolios, in this part, what should I filter and rank them by? 1. Profit Factor 2. CAGR/Max DD% 3. Sharpe Ratio 4. Return/Drawdown Ratio (Ret/DD) 5. Stability 6. Open Drawdown % 7. Max Drawdown % 8. Consecutive Win/Loss Trades 9. Net Profit 10. R-Squared (R²)

To build the 4-6 portfolios in Phase 1, focusing on filtering and ranking the strategies effectively, I would suggest using a weighted approach to emphasize the metrics that align with both profitability and risk management for long-term stability. Here’s how to prioritize and filter the metrics:

  • Why: This is one of the most crucial metrics because it shows how well the strategy performs in terms of growth while managing risk. Higher values mean you get better returns for each unit of risk.
  • How to Filter: Select strategies with a CAGR/Max DD% > 1 as a minimum requirement, and prioritize strategies that have values significantly greater than 1 (e.g., >1.5 or >2) for better risk-adjusted returns.
  • Why: The Sharpe Ratio indicates risk-adjusted returns. A Sharpe Ratio > 2 is generally considered excellent, as it means the strategy is delivering high returns for the level of volatility/risk involved.
  • How to Filter: Filter out strategies with Sharpe ratios below 2. Rank remaining strategies by Sharpe Ratio as a second key factor.
  • Why: The Profit Factor compares gross profits to gross losses. A Profit Factor > 1.5 indicates that for every dollar risked, the strategy earns at least 1.5 dollars.
  • How to Filter: Filter strategies with a Profit Factor above 1.5 and rank them to ensure a healthy balance of profits vs losses.
  • Why: This metric reflects how much return you are getting for each unit of drawdown. A higher value indicates better performance relative to risk.
  • How to Filter: Ret/DD values should be high (>2), and strategies with strong Ret/DD ratios should be given more weight in the ranking process.
  • Why: This measures the consistency of the equity curve. Stability above 0.8 ensures smoother performance with fewer wild swings.
  • How to Filter: Filter for strategies with Stability > 0.8 and rank by Stability to ensure you are selecting smooth performers.
  • Why: Open Drawdown % indicates how much capital is at risk while a trade is active. Keeping this low ensures that you don’t have a lot of capital exposed to ongoing risk.
  • How to Filter: Select strategies with Open DD < 15% to avoid excessive risk during open trades.
  • Why: Max Drawdown % shows the largest peak-to-trough drop in equity. Lower drawdowns indicate less capital loss during downturns.
  • How to Filter: Set a maximum acceptable drawdown threshold (e.g., Max DD < 20-25%), and give higher preference to strategies with lower Max Drawdowns.
  • Why: Net Profit is important for absolute returns but should not overshadow risk-adjusted performance metrics.
  • How to Filter: While this metric should not dominate, it’s important to ensure the strategies are delivering consistent profits. Rank by profit only after other risk-adjusted metrics.
  • Why: R² measures the strength of the trend in the equity curve. While useful, this can be less relevant for short-term portfolios.
  • How to Filter: R² should be considered, but not weighted too heavily in early portfolio building stages.
  • Why: This is more of a psychological metric that shows how many wins or losses can occur consecutively. While useful, this is not a key metric for filtering.
  • How to Filter: Use this as a final check to ensure your selected strategies don’t have extreme streaks of losses or wins, which could indicate volatility.

  1. Primary Filters: Start by filtering with CAGR/Max DD% > 1Sharpe Ratio > 2Profit Factor > 1.5Stability > 0.8, and Open Drawdown < 15%.
  2. Ranking: Once you’ve applied these filters, rank the remaining strategies using CAGR/Max DD%Sharpe Ratio, and Ret/DD as your top three criteria.
  3. Secondary Filters: As a secondary consideration, check Max Drawdown %, Net Profit, and Stability to ensure balanced strategies.
  4. Final Checks: Lastly, apply Consecutive Win/Loss Trades and  to fine-tune for consistency and smoother equity curves.

This structured approach will allow you to maximize the robustness and profitability of your strategies while controlling risk and volatility.

Portfolio Master comparison.

Compare with my last step. Now I have more than 500 strategies ready to enter [Portfolio Master] mode by selecting the number of strategies between 4-8 in each Port. I want to know that if I set the values​​above, select the best one from what SQX offers, and create 1 Port, then delete it from the existing list to create it, so that all 500 strategies can be used almost completely, even if they are not as good as the first one I got. And/or I will create it only once from 500 and filter from the above list, selecting the best values ​​to create each Port, so that I will have a total of 12 good portfolios as you suggest, without deleting any of them. Please provide your comments.

Given your setup with more than 500 strategies and the intention to build 12 solid portfolios, here’s a detailed comparison of the two approaches you’re considering:

  • Process: You filter your strategies based on the set criteria (CAGR/DD%, Sharpe Ratio, etc.), create a portfolio using the best 4-8 strategies, and then remove the used strategies from the list.
  • Advantages:
    • Focus on Highest Quality: By selecting only the top-performing strategies for each portfolio, you ensure that each portfolio is built with the best available options.
    • No Duplication: Strategies used in one portfolio won’t be repeated, which diversifies the approaches and reduces over-reliance on specific strategies.
    • Cleans the List: Removing strategies ensures that you always have a fresh pool for the next portfolio.
  • Disadvantages:
    • Risk of Running Out of Quality: As you progress, there may be a diminishing number of high-quality strategies available for later portfolios, potentially forcing you to accept weaker strategies.
    • More Manual Work: You need to keep track of what’s been used and make adjustments after each portfolio creation, which could be time-consuming.
  • Process: You filter your strategies according to the same criteria and create 12 portfolios without deleting any strategies, allowing overlap and repeated use across portfolios.
  • Advantages:
    • Maximize Usage: You get the most out of your 500 strategies, as none are permanently removed, allowing you to pick the best for each new portfolio.
    • Less Pressure on Strategy Availability: By not deleting strategies, you can create multiple portfolios with some repetition, ensuring that each portfolio still has top-performing strategies.
    • Faster Process: You won’t need to track what’s already been used, simplifying the portfolio creation.
  • Disadvantages:
    • Over-Reliance on Certain Strategies: Repeating strategies across portfolios may lead to over-reliance on certain approaches, which could expose all portfolios to similar risks, especially during market drawdowns.
    • Lower Diversification: Even though you have multiple portfolios, repeating strategies means the portfolios may not be as diversified as they could be.

For your goal of building 12 high-quality portfolios, I’d suggest combining aspects of both approaches:

  1. Phase 1: Start by creating 4-6 portfolios using the best available strategies, without deleting any of them. This ensures you’re maximizing the top performers for multiple portfolios.
  2. Phase 2: For the remaining portfolios, introduce more diversity by removing the strategies already used from your selection pool, ensuring fresh strategies are prioritized.

This blended approach balances strategy quality with portfolio diversity, giving you strong portfolios while maximizing your use of all 500 strategies. In this way, you ensure that you maintain both performance and diversification across the entire portfolio set.

IS and OOS.

Added ability to filter by IS and OOS in each topic to see which IS/OOS should be used.

When adding the ability to filter by In-Sample (IS) and Out-of-Sample (OOS) performance in each metric or topic, it becomes critical to differentiate between the two phases of strategy testing. The IS data is used to develop and optimize the strategy, while the OOS data tests the strategy on unseen, untouched market conditions to assess its robustness.

Here’s how to approach filtering each metric for IS and OOS:

  • In-Sample (IS): The period used for building and optimizing the strategy. High IS performance may indicate overfitting if OOS performance is poor.
  • Out-of-Sample (OOS): The unseen data used to test the robustness of a strategy. Good OOS performance indicates that the strategy generalizes well to unseen market conditions.
  1. Profit Factor
    • IS Target: Should be > 1.5.
    • OOS Target: A good profit factor in OOS should remain above 1.3 or higher to show that the strategy is profitable without overfitting.
    • Purpose: This shows how well the strategy is balancing profits against losses both in-sample and out-of-sample.
  2. CAGR/Max DD%
    • IS Target> 1 (This indicates returns are higher than the risk during optimization).
    • OOS Target: Should ideally remain above 0.8 in OOS. If the value dips significantly, it might indicate over-optimization in the IS phase.
    • Purpose: It helps compare growth to risk over the strategy’s life cycle. Stability in this metric across IS and OOS is important for long-term performance.
  3. Sharpe Ratio
    • IS Target> 2 (This shows good risk-adjusted performance in-sample).
    • OOS Target: Should remain above 1.5 in OOS. Sharpe ratios dropping significantly in OOS may indicate risk or volatility problems in unseen data.
    • Purpose: This measures the strategy’s ability to handle risk consistently, and OOS results are crucial to validate its stability in live trading.
  4. Return/Drawdown Ratio (Ret/DD)
    • IS Target> 2 (Shows solid returns in comparison to risk).
    • OOS Target: Ideally, you want this to stay above 1.5 to confirm stability.
    • Purpose: A high Ret/DD ratio in IS shows good returns relative to risk, but if the OOS version drops sharply, it indicates the strategy may not handle risk well in real market conditions.
  5. Stability
    • IS Target> 0.8 (A smooth, consistent equity curve).
    • OOS Target: Stability should remain > 0.7 in OOS. A significant drop indicates the strategy’s performance may become inconsistent in live conditions.
    • Purpose: High stability across IS and OOS ensures a smooth equity curve, avoiding sharp performance drops in real trading.
  6. Open Drawdown %
    • IS Target< 15% (Keeps risk exposure in check during optimization).
    • OOS Target: Should remain below 20% in OOS testing. If OOS drawdowns significantly exceed the IS values, the strategy may struggle in volatile or unseen markets.
    • Purpose: Managing open drawdowns is critical for risk control, and seeing how this behaves OOS ensures you’re not taking on excessive risk in real trading.
  7. Max Drawdown %
    • IS Target< 20% (Manages maximum peak-to-valley losses).
    • OOS Target: Should not exceed 25% in OOS. Drawdown stability between IS and OOS indicates the strategy is capable of handling stress.
    • Purpose: This metric helps manage risk, ensuring that no single market condition causes extreme losses.
  8. Consecutive Win/Loss Trades
    • IS Target> 2 (Aims for win streaks without significant drawdowns).
    • OOS Target: Should be similar to IS results, or show a smooth transition. Long losing streaks in OOS can be a warning sign.
    • Purpose: This shows how often you can expect consecutive wins or losses. Stability between IS and OOS is a good indicator of robustness.
  9. Net Profit
    • IS Target: Positive net profit in IS with steady growth.
    • OOS Target: Should maintain a positive net profit. If OOS performance is significantly lower, this indicates overfitting.
    • Purpose: Maintaining positive net profit in both IS and OOS is crucial for real trading profitability.
  10. R-Squared (R²)
    • IS Target> 0.8 (A high R² shows smooth, predictable growth).
    • OOS Target: Should remain above 0.7 to avoid overfitting. A significant drop in OOS means the strategy is inconsistent.
    • Purpose: This metric helps you find strategies that perform smoothly without high volatility in their returns.
  11. Sortino Ratio
    • IS Target> 1.5 (Indicates good risk-adjusted returns considering only downside volatility).
    • OOS Target: Above 1.2 in OOS. A sudden drop in Sortino indicates the strategy is exposing itself to more downside risk than it did during optimization.
    • Purpose: This is a good alternative to Sharpe Ratio, focusing on negative risk rather than total risk. Stability in OOS is critical for downside protection.
  1. First pass with IS filters:
    • During the initial build/optimization phase, filter strategies based on high values for key metrics in the IS data. Use Profit Factor > 1.5CAGR/Max DD% > 1Sharpe Ratio > 2Ret/DD > 2, and Stability > 0.8.
  2. Second pass with OOS filters:
    • After IS optimization, evaluate the strategies in the OOS phase. Set slightly lower but still acceptable values: Profit Factor > 1.3Sharpe Ratio > 1.5CAGR/Max DD% > 0.8Ret/DD > 1.5, and Stability > 0.7.
  3. Compare IS and OOS performance:
    • Discrepancies between IS and OOS are normal, but they should not be drastic. If a strategy performs well in IS but poorly in OOS, it’s likely overfitted. Favor strategies with consistent metrics across both phases.

By maintaining these IS/OOS targets in SQX, you can ensure your strategies are robust and able to handle live trading without deteriorating due to overfitting.

Profitable ranking/filter.

Do you know all the filters / ranking (like profit factor, cagr/dd%, return/dd, ..) to mean profitable or good trend within SQX?

Yes, in StrategyQuant X (SQX), various performance metrics and ranking filters are used to assess whether a strategy is profitable and stable over time. Here’s a list of the most important metrics along with what they indicate and how they can be used for filtering/ranking:

  1. Profit Factor
    • What it measures: The ratio of gross profits to gross losses.
    • Good value: A Profit Factor greater than 1.5 is generally considered good, with values over 2 indicating strong performance.
    • Purpose: Filters out strategies that earn significantly more than they lose.
  2. CAGR/Max Drawdown % (Compounded Annual Growth Rate / Max Drawdown)
    • What it measures: It compares the strategy’s annualized returns to the maximum drawdown (risk).
    • Good value: A ratio greater than 1 is a positive indicator, meaning the returns are higher than the risk (drawdown).
    • Purpose: Filters strategies that balance returns and risk effectively. Higher values indicate more sustainable growth relative to risk.
  3. Return/Drawdown Ratio (Ret/DD)
    • What it measures: Another way to compare the strategy’s return against the drawdown.
    • Good value: The higher, the better. Values above 2 are typically desirable.
    • Purpose: Similar to CAGR/Max DD%, this shows how well the strategy performs against its worst losses.
  4. Sharpe Ratio
    • What it measures: The Sharpe Ratio measures risk-adjusted returns, or how much excess return the strategy generates per unit of risk.
    • Good value: A Sharpe Ratio above 1 is considered good, while above 2 is excellent.
    • Purpose: Helps identify strategies that have consistent returns relative to risk.
  5. Stability
    • What it measures: Measures the consistency of a strategy’s equity curve (how stable the growth is over time).
    • Good value: A value greater than 0.8 is typically considered good.
    • Purpose: Filters strategies that have steady performance without sharp fluctuations.
  6. Open Drawdown %
    • What it measures: The percentage of drawdown that is still open (unrealized loss).
    • Good value: Keeping Open DD% below 15% is often desirable.
    • Purpose: Ensures that strategies don’t leave too much risk open during trades, keeping the drawdowns controlled.
  7. Max Drawdown %
    • What it measures: The largest peak-to-valley loss in equity.
    • Good value: Max DD% below 20% is usually acceptable for longer-term strategies, with lower being better for risk-averse traders.
    • Purpose: Filters strategies that limit their risk exposure during downturns.
  8. Consecutive Win/Loss Trades
    • What it measures: The maximum number of consecutive winning or losing trades.
    • Good value: This metric is mostly a secondary consideration but can show streaks in winning or losing.
    • Purpose: Can be used to avoid strategies that have long losing streaks.
  9. CAGR (Compounded Annual Growth Rate)
    • What it measures: The annualized percentage growth of your account or equity curve.
    • Good value: The higher the better, though it should be balanced with risk measures.
    • Purpose: Shows the growth potential of the strategy.
  10. R-Squared (R²)
    • What it measures: Shows the statistical fit of the strategy’s equity curve to a straight line. The closer to 1, the more stable the strategy’s growth.
    • Good value: Above 0.8 is ideal for long-term stability.
    • Purpose: Filters strategies with consistent upward growth.
  11. Kelly Criterion
    • What it measures: Calculates the optimal position sizing based on past performance.
    • Good value: A higher Kelly value indicates better risk-adjusted returns, but too high may suggest over-leveraging.
    • Purpose: Guides sizing to maximize growth while managing risk.
  12. Net Profit
    • What it measures: The total profit after deducting losses and costs.
    • Good value: Positive and stable net profit over time is crucial, but it should be compared against risk metrics.
    • Purpose: Ensures the strategy is actually making money.
  13. Sortino Ratio
    • What it measures: Similar to the Sharpe Ratio but only considers downside risk (negative returns).
    • Good value: A value above 1 is good, and higher values indicate better risk-adjusted performance focusing on negative volatility.
    • Purpose: Helps focus on strategies that minimize downside volatility while delivering good returns.
  • Primary Filters:
    • Sharpe Ratio > 2: Helps find strategies with good risk-adjusted returns.
    • CAGR/Max DD% > 1: Ensures returns are higher than drawdowns.
    • Profit Factor > 1.5: Ensures profits are sufficiently higher than losses.
  • Secondary Filters:
    • Open DD% < 15: Ensures drawdowns are within acceptable limits.
    • Stability > 0.8: Ensures a smooth and steady equity curve.
  • Other Considerations:
    • Max Drawdown %: This is crucial for risk management, as it can help avoid strategies with sharp drawdowns.
    • Return/Drawdown: Ensures that the strategy’s returns justify the risk it takes.

By using a combination of these filters, especially focusing on Sharpe Ratio, Stability, Profit Factor, and drawdowns, you can filter out strategies that are robust, profitable, and capable of performing well in live trading.

If i dont want to use ADX MACD RSI ATR.

If you prefer not to use ADXMACDRSI, or ATR, we can build the strategy using other signals from your available list in SQX. Below is an alternative setup using simpler, yet effective indicators:

  • Candle Patterns: For price action and reversal detection.
  • Bollinger Bands: To capture volatility and breakout opportunities.
  • Moving Averages: For trend direction and entry triggers.
  • Fractals: To identify local highs/lows for breakouts or retracements.

1. Entry Signals

  • Candle Pattern: Use bullish or bearish reversal candle patterns (like engulfinghammer, or doji) as entry triggers.
  • Moving Average Crossover:
    • Buy when a faster-moving average (e.g., 10-period) crosses above a slower-moving average (e.g., 50-period).
    • Sell when the faster MA crosses below the slower MA.
  • Bollinger Bands: If the price closes above the upper band, consider a buy (bullish breakout). If it closes below the lower band, consider a sell (bearish breakout).
  • In Entry Conditions, use the Candle Pattern indicator for reversal patterns.
  • Add Moving Average Crossover as a trend confirmation filter.
  • Include a condition using Bollinger Bands to detect breakouts and confirm volatility.
  • Fractal Exit: Exit positions when the price hits a recent fractal high (for buy trades) or a fractal low (for sell trades).
  • Bollinger Bands Reversal: Close the position if the price reverses and closes inside the Bollinger Bands after breaking out.
  • Time-based Exit: Close all positions after 5 days to limit the holding period.
  • Friday Close: Automatically close all trades at 23:30 on Fridays to avoid weekend risk.
  • In Exit Conditions, use the Fractal Indicator to detect recent highs and lows for exit points.
  • Set up a rule to exit when the price re-enters the Bollinger Bands after a breakout.
  • Define a Time-based Exit rule to close trades after 5 days or on Friday.
  • Fixed Lot Size: Trade with 0.01 lots per $100 of the account balance.
  • Risk Management: Set a fixed percentage of risk per trade (e.g., 1% of the total account).
  • Grid Layer (Optional): Place pending buy/sell orders at intervals (e.g., 10 pips) from the current price to capture retracements or price movements.
  • In Money Management, set your fixed lot size and risk percentage.
  • If you want a grid, use the Pending Orders functionality to create a grid around the current price.
  1. Duplicate Trades: Enable multiple trades to open in the same direction.
  2. Break-Even: Move the stop loss to break-even once the trade has moved in your favor by a certain distance (e.g., a fixed pip value or after hitting a fractal level).

  1. Backtest: Run your backtests using M1 data over 20 years.
  2. Optimize: Adjust moving average periods, Bollinger Band deviations, and fractal periods to find the best combination.
  3. OOS Testing: Validate the strategy’s performance on out-of-sample data.

By removing ADXMACDRSI, and ATR, this setup focuses more on price action with simple indicators that track volatility and trend strength.

Simple Trend Momentum Grid Strategy..

Let’s simplify things by using the signals you already have in your system. Here’s a strategy you can set up with your available indicators:

This strategy will capture both trend-following and breakout moves with simple signals, using indicators already present in SQX.

  1. Primary Indicators:
    • ADX: For confirming strong trends.
    • MACD: For detecting momentum and direction.
    • RSI: To help with overbought/oversold levels.
    • ATR: For volatility-based risk management.

1. Entry Signals

  • MACD Crossover: Enter a buy when the MACD line crosses above the signal line, and enter a sell when the MACD line crosses below the signal line.
  • ADX > 25: Confirm that the market is trending before allowing an entry.
  • RSI Confirmation:
    • If RSI > 70, avoid buying (overbought signal).
    • If RSI < 30, avoid selling (oversold signal).
  • In SQX, use Entry Conditions with MACD crossover as the trigger.
  • Add an additional filter where ADX > 25 to confirm trend strength.
  • Add RSI as a filter to avoid extreme market conditions.
  • Take Profit and Stop Loss: Use ATR-based levels. For example:
    • Take Profit: 2x ATR(14).
    • Stop Loss: 1x ATR(14).
  • Trailing Stop: Trail the stop loss based on ATR, moving the stop higher/lower as the trend progresses.
  • Exit by Time: Close all positions every Friday at 23:30 to avoid weekend gaps.
  • In Exit Conditions, define take profit and stop loss levels based on ATR values.
  • Use the Trailing Stop function with ATR.
  • Set a rule in Exit Conditions to close all trades at a specific time on Friday.
  • Use Lot Size: 0.01 lots per $100 of the account balance.
  • Risk %: Define risk management to ensure that no more than a specific percentage (e.g., 1%) of the total capital is risked on each trade.
  • In SQX, use the Money Management tab to set the lot size and risk percentage.
  • If you want a grid layer to capture additional profits, set up pending orders at regular intervals around the current price (e.g., every 10 pips) with small lot sizes.
  • You can also adjust the grid based on market volatility using ATR.

  1. Backtest: Use your M1 data over the 20-year range to evaluate how the strategy performs.
  2. Optimize: Fine-tune the parameters like ATR multiples, grid intervals, and trailing stops for the best results.
  3. Out-of-Sample Testing: Ensure that your strategy performs well in unseen data to confirm robustness.

This simpler approach will help you use the signals you’re familiar with while maintaining solid trend-following and risk management.

Random uniqe and exotic trading style.

By merging these trading strategies with your specifications, you’ll create a highly adaptable system that should perform well across different market conditions. Would you like to test this setup with a focus on any particular method or combination first? ———— make 1 of random uniqe and exotic trading style

Here’s an exotic and unique trading strategy that merges multiple aspects of traditional techniques but with an unconventional twist:

Concept: This strategy combines the principles of grid trading, harmonic patterns, and momentum breakouts. The goal is to capture both trending and ranging market conditions while managing risk dynamically. It thrives on detecting strong directional moves and harmonic reversals, using grid placement to capture both breakouts and retracements.

  1. Grid Trading Layer:
    • A grid of orders is placed at regular intervals above and below the current price, with a predetermined spacing (e.g., 10 pips).
    • The grid can be expanded dynamically based on market volatility using ATR.
    • If price moves into a trending market, breakouts are captured, while in ranging conditions, price oscillations fill and close the grid orders profitably.
  2. Harmonic Pattern Recognition:
    • The strategy identifies harmonic patterns (e.g., Gartley, Bat, Butterfly) using Fibonacci retracements and extensions.
    • When a pattern completes, it signals a reversal or continuation of the trend.
    • Entry orders are placed based on the harmonic reversal points, with grids enhancing profit capture from both retracement and continuation.
  3. Momentum Confirmation (RSI + MACD):
    • RSI is used to confirm momentum. If RSI > 70, look for shorting opportunities; if RSI < 30, look for buying opportunities.
    • MACD crossover signals trend strength and confirms breakout conditions. If the MACD lines cross and the grid captures the breakout, positions are allowed to ride the momentum.
  4. Dynamic Risk Management:
    • Trailing Stop: Adjusts dynamically based on ATR, ensuring profits are locked in while allowing the trade to run.
    • Break-even Stop: Once price moves halfway to the profit target, the stop loss moves to break even, ensuring no loss on that trade.
  5. Weekly Market Reset:
    • All open trades are closed by the end of the trading week, ensuring no positions are held over the weekend to avoid gaps.
    • The grid resets at the beginning of the new week with fresh levels based on the week’s opening volatility.
  • Timeframes: H1 for main signal entries, H4 for confirming harmonic patterns and momentum direction.
  • Market: Gold (XAU/USD).
  • Lot Sizing: 0.01 lot per $100 of the account balance, with risk managed by risk percentage of total capital (as per your initial design).
  • Risk/Reward Ratio: Aimed at 1:3 or higher.
  1. Setup Phase: The grid is initialized with buy and sell orders at regular intervals.
  2. Harmonic Detection: As the market moves, harmonic patterns are identified, and additional grid orders are aligned to these patterns, looking for precise reversals.
  3. Momentum Confirmation: If the market shows momentum through RSI and MACD crossovers, additional positions are opened based on the breakout strength.
  4. Profit Capture: As price fluctuates within the grid, orders are closed for profits. If momentum is strong, the trailing stop secures profits as the price trends.
  • Multi-Layer Strategy: This strategy captures both ranging and trending conditions. The harmonic patterns add precision, while the grid ensures profits from oscillations, and momentum ensures strong breakouts are capitalized on.
  • Versatile Profit Capture: Whether the market moves wildly or remains calm, this strategy can adapt, always seeking opportunities across multiple layers.

Out-Of-Sample (OOS) performance.

OOS Testing: More importantly, assess the performance during out-of-sample testing to ensure the strategy is robust in unseen market conditions. Strategies with a high OOS Sharpe ratio and low OOS drawdowns are more likely to perform well in live trading.

this OOS should be > ?

 

When assessing out-of-sample (OOS) performance, the following benchmarks can help determine if a strategy is robust enough for live trading:

1. OOS Sharpe Ratio:

  • A Sharpe ratio greater than 1 indicates that the strategy has delivered excess returns relative to its volatility.
  • A Sharpe ratio of greater than 2 is considered excellent, suggesting strong performance and favorable risk-adjusted returns.

2. OOS Drawdown:

  • Aim for a maximum drawdown of less than 15%. This benchmark helps ensure that the strategy does not experience severe losses that could jeopardize the trading account.
  • Additionally, the recovery time from drawdown is important; faster recovery is generally preferable.

3. Profit Factor:

  • A profit factor greater than 1.5 is generally favorable. This means that the strategy makes 1.5 times more profit than it loses.

4. Consistency:

  • Look for consistency in OOS performance metrics, such as stable returns and low volatility, over a sufficient sample size (e.g., at least 6-12 months of trading).

Summary:

  • OOS Sharpe Ratio > 1 (ideally > 2)
  • Maximum OOS Drawdown < 15%
  • Profit Factor > 1.5

Meeting these benchmarks can indicate that the strategy is likely to perform well in live trading.

300 ea in Portfolio

To filter and select the best strategies from your 300+ strategies in Portfolio Master, follow a systematic approach that aligns with your ranking criteria and ensures that only the most robust and stable strategies are included in the final portfolio. Here’s a step-by-step guide to filtering:

Use the criteria you’ve already set for ranking individual strategies: – CAGR/Max DD% > 1 – Sharpe Ratio > 2 – Profit Factor > 1.5 – Stability > 0.8 – Open DD% < 15%

This initial filter should remove many strategies that don’t meet the baseline performance requirements.

  • IS Testing: Review the performance of each strategy during the in-sample period to ensure that it was optimized correctly.
  • OOS Testing: More importantly, assess the performance during out-of-sample testing to ensure the strategy is robust in unseen market conditions. Strategies with a high OOS Sharpe ratio and low OOS drawdowns are more likely to perform well in live trading.
  • Use correlation analysis to ensure that strategies in your portfolio are not highly correlated. Highly correlated strategies expose you to similar risks across multiple strategies, increasing the chances of simultaneous drawdowns.
  • Keep strategies with low or negative correlation in your portfolio to achieve diversification and reduce risk.
  • Perform Monte Carlo stress tests on your selected strategies to assess how they handle market noise and randomness. Strategies that consistently perform well under Monte Carlo simulations are more robust.
  • Focus on strategies with a low chance of ruin and those that maintain good metrics like Sharpe ratio and Profit Factor in the simulated results.
  • Look for strategies that maintain consistent trade frequency and avoid excessive overtrading, which can increase transaction costs and slippage.
  • Ensure that strategies follow a balance of trend-following, breakout, and swing trading methodologies (as you’ve chosen) to reduce dependency on a single market condition.
  • Evaluate how fast each strategy recovers from drawdowns. Strategies that recover quickly are generally more reliable for long-term use. Use the drawdown recovery time as an additional filter.
  • Take your top strategies and conduct a small-scale forward testing or paper trading to see how they behave in current market conditions. Live market dynamics often differ from historical data, so this step is crucial for final validation.
  • After narrowing down the best-performing strategies, use Portfolio Master to combine them into an optimized portfolio with diverse market exposures and timeframes (H1/H4, M15/H4, etc.).
  • Make sure the combined strategies adhere to your risk management rules, such as RRR > 1:3duplicate ordersclosing positions on Fridays, and break-even trailing stops.
  • Continue to monitor the performance of your portfolio once it’s live, making adjustments only if necessary. Pay attention to how strategies perform during different market phases (trending, ranging, volatile) to ensure long-term stability.

By following this structured filtering process, you’ll be able to select a portfolio of strategies that not only meet your criteria but are also robust, diversified, and ready for live trading.

Is possible to found my setup?

Yes, it is possible to find or build a strategy that meets these criteria, but it will depend on several factors, including the quality of your data, the optimization process, and the strategy type.

Here’s a breakdown of what each criterion implies and how achievable it is:

1. CAGR/Max DD% > 1:

  • Achievability: This is a reasonable and important target, as it ensures your strategy produces more growth than risk. You can achieve this through proper risk management, consistent profits, and by minimizing drawdowns.
  • Tuning Tips: Focus on risk control, such as using tight stop losses and proper position sizing (e.g., your 0.01 lot per $100 account balance rule).

2. Sharpe Ratio > 2:

  • Achievability: A Sharpe Ratio above 2 is challenging but realistic, especially with a well-optimized strategy. It implies high risk-adjusted returns with low volatility.
  • Tuning Tips: To achieve this, focus on strategies that reduce large fluctuations in returns. Use techniques like trailing stops, break-even exits, and conservative risk management. Avoid strategies with excessive drawdowns or those that rely on highly volatile instruments without proper hedging.

3. Profit Factor > 1.5:

  • Achievability: This is a common target for profitable trading strategies. A profit factor above 1.5 indicates that your gross profits are at least 1.5 times larger than your gross losses.
  • Tuning Tips: Optimize entry/exit rules, avoid overtrading, and focus on strategies that aim for higher reward-to-risk ratios, such as your target of RRR > 1:3.

4. Stability > 0.8:

  • Achievability: Stability near 0.8 is a realistic goal for most well-performing strategies. It shows a relatively smooth and reliable equity curve, which is necessary for long-term performance.
  • Tuning Tips: Stability can be enhanced by reducing the frequency of large drawdowns, fine-tuning exit rules, and optimizing over a range of market conditions (using IS and OOS testing).

5. Open DD% < 15%:

  • Achievability: This is achievable but can be difficult if you’re targeting high returns. Controlling open drawdown is crucial to keep the account safe from volatile market swings.
  • Tuning Tips: You can keep open drawdown in check by adjusting trade size, using dynamic stop-loss management (e.g., ATR-based stops), or employing partial exits as trades move into profit.

Finding Such a Strategy:

  1. Backtesting and Optimization: You’ll likely need extensive backtesting with 20 years of M1 data (as you’re already using) to find strategies that meet all these criteria. Sequential optimization across timeframes (H1, H4, etc.) can help refine strategies for long-term stability.
  2. Strategy Combination: You may need to combine trend followingbreakout, and swing trading methods, as these tend to perform well in various market conditions.
  3. Fine-Tuning Parameters: Parameters like risk management rules, trailing stops, and exit timing (closing trades before Friday or after 5 days) will play a key role in managing drawdowns and ensuring the other metrics hold up.

It will take work, but it is possible to find a strategy that fits within these boundaries. Be prepared for iterative testing and refinement in StrategyQuant X to optimize across these performance metrics.

I need confirm stability for long term running?

When focusing on long-term stability for your strategy, aside from CAGR/Max DD% and Sharpe Ratio, the most critical metric to consider is Profit Factor. However, other important factors like Stability and Open Drawdown (DD) also play key roles in assessing the reliability of your strategy. Let’s explore these metrics:

  • What it Measures: The ratio of gross profit to gross loss. For example, a profit factor of 1.5 means that for every dollar lost, you are making 1.5 dollars in profit.
  • Importance: A higher profit factor (typically > 1.5) is crucial for long-term viability. It shows that the strategy generates more profit than loss over time.
  • Why It’s Key for Long-Term Stability: It directly reflects the strategy’s overall profitability, indicating whether it can sustain profitability through different market conditions.
  • Ideal Target: Profit Factor above 1.5 is solid, while a value of 2.0 or more is very strong.
  • What it Measures: The consistency of your strategy’s performance over time. It looks at the smoothness of the equity curve.
  • Importance: Stability indicates how reliable the strategy is at generating returns without significant fluctuations.
  • Why It’s Key for Long-Term Stability: A stable equity curve suggests that your strategy can withstand various market environments without experiencing wild swings in performance.
  • Ideal Target: Aim for a stability score close to 1, where 1 represents a perfectly straight equity curve.
  • What it Measures: The maximum unrealized loss during a trade (before it’s closed).
  • Importance: While Max Drawdown focuses on the worst drawdown for closed trades, Open DD% shows how much risk your strategy takes while trades are still open.
  • Why It’s Key for Long-Term Stability: High open drawdowns can cause emotional stress and can put your account at risk, especially during volatile periods. Keeping open drawdowns low ensures your strategy can withstand market swings without large floating losses.
  • Ideal Target: Aiming for Open DD% < 10-15% is generally considered good for long-term sustainability.

  1. Profit Factor (Most Important): Reflects the overall profitability of your strategy. Target >1.5, ideally >2.
  2. Stability: Measures how smooth and reliable your equity curve is. Aim for a stability score near 1.
  3. Open Drawdown %: Keep this value as low as possible to avoid large floating losses. Aim for <10-15%.

Focusing on these three metrics will help confirm your strategy’s long-term stability and profitability, making it robust enough to withstand different market conditions.

CAGR/Max DD% and Sharp ratio ?

what’s the most priority betwee CAGR/Max DD% and Sharp ratio ?

When prioritizing between CAGR/Max DD% and Sharpe Ratio, it depends on your strategy’s goals and risk tolerance. Here’s how to assess their importance:

  • What it Measures: The growth of your account over time (CAGR) relative to the worst peak-to-trough decline (Max Drawdown).
  • Importance: It tells you how much risk (drawdown) you’re taking to achieve returns. A higher CAGR/Max DD means your returns are efficient in relation to the risk you’ve taken.
  • When it’s Critical:
    • When you aim for long-term, steady growth with controlled risk.
    • If you prioritize minimizing drawdowns, which is crucial for strategies that need to stay resilient in volatile markets (like your long-term trading approach).
  • What it Measures: The return per unit of risk (volatility). It measures how well your strategy compensates you for the risk taken (volatility of returns).
  • Importance: A higher Sharpe ratio (above 1, or ideally above 2) means the strategy offers a better risk-adjusted return. It’s a good metric for comparing different strategies to see which one generates smoother returns relative to volatility.
  • When it’s Critical:
    • When you care about consistent performance and want to compare risk-adjusted returns between strategies.
    • If your strategy experiences large fluctuations in returns, the Sharpe ratio helps determine if the higher returns are worth the risk (volatility).

  • CAGR/Max DD%: Since you are building a strategy for long-term use, minimizing drawdowns (while still growing your account) is a key consideration. This metric is more focused on the capital preservation aspect and will be vital in avoiding large losses that could wipe out significant portions of your account.
  • Sharpe Ratio: It’s essential for ensuring that your strategy has consistent returns relative to risk. However, if your drawdowns are well-managed (as per the focus on risk control), the Sharpe Ratio becomes secondary in importance.

For your strategy goals (focused on long-term performance and risk management): 1. CAGR/Max DD% should be the top priority because it balances growth with minimizing drawdowns. 2. Sharpe Ratio is important but secondary to CAGR/Max DD%. You should still aim for a Sharpe ratio above 1 (preferably 2+), but don’t compromise your drawdown management to chase a higher Sharpe ratio.

Focus on maximizing CAGR/Max DD% to ensure your strategy can grow steadily with minimal drawdowns. A high Sharpe Ratio (above 2) is an excellent goal but secondary to ensuring that your strategy survives long-term market swings with controlled drawdowns.

Combinated, Lets proceed

Great! Now that we’re moving forward with the Trend + Breakout + Swing Trading combination, here’s the plan to proceed:

  1. Initial Setup:
    • Main Timeframe: H1 (for active signals).
    • Sub Timeframe: H4 (for confirmation).
    • Open Duplicate Orders allowed, with signals from Trend Trading (ADX, Ichimoku, MACD), Breakout (Bollinger Bands, ATR, Momentum), and Swing Trading (RSI, Fractals, MACD).
    • Implement trailing stop and break-even with ATR or Parabolic SAR.
    • Ensure RRR > 1:3 and close all trades by Friday.
  2. Optimization:
    • Risk and Lot Size Management: 0.01 lots per $100 balance, with risk percentage on the account.
    • Sequential optimization for additional timeframes like M30/H4, M15/H4, M5/H4 to explore robustness across different market conditions.
    • Focus on finding the optimal parameters for indicators like ATR and Ichimoku to maximize profitability across both trending and volatile markets.
  3. Backtesting:
    • Using your M1 data over 20 years, run the backtest for IS (In-Sample) and OOS (Out-of-Sample) periods.
    • Analyze performance metrics: Profit Factor, RRR, Stability, Drawdown, and Win/Loss ratio.
  4. Validation:
    • Post-backtest, validate on OOS data to ensure consistency and reliability in live market conditions.

Continue combination…

To start with a combination that covers different market conditions while aligning with your desired strategy, I recommend focusing on a hybrid of Trend TradingBreakout Strategy, and Swing Trading. These three strategies complement each other well and offer a balanced approach to both trending and volatile markets.

  1. Trend Trading: Capitalizes on long-lasting trends using indicators like ADXMACD, and Ichimoku to identify strong trends. This ensures you catch larger moves.
  2. Breakout Strategy: Helps in volatile conditions where price breaks out of consolidation. Use Bollinger BandsATR, and Momentum to identify breakouts and apply trailing stops to secure gains.
  3. Swing Trading: Captures intermediate price swings between market highs and lows. MACDRSI, and Fractals work well to time entry and exit points, ensuring you profit from reversals or corrections.
  • Trend Trading: Use ADX (>25) to confirm a strong trend. Combine with Ichimoku for entry points in the direction of the trend. Apply MACD for further momentum confirmation.
  • Breakout Strategy: Add Bollinger Bands for spotting volatility and breakout zones, while ATR helps manage trailing stops after the breakout. Momentum confirms the strength of the breakout.
  • Swing Trading: Use Fractals and RSI to identify swing highs and lows. Swing trades can be opened in the direction of the trend or at key reversal points. Apply a trailing stop or break-even to secure profits on swings that move in your favor.
  1. Open Orders with Duplicates Allowed: During strong trend or breakout conditions, duplicate trades can be placed. For instance, multiple orders can be triggered as long as ADX shows a strong trend or Bollinger Bands expand during a breakout.
  2. Profit Targets: Exit trades when profit reaches 1-5% of total capital or the position exceeds 5 days. Use RSI or Fractals to close swing trades, while MACD and ATR help manage trend and breakout exits.
  3. Break-Even and Trailing Stop: Apply a Parabolic SAR or ATR-based trailing stop after price moves in your favor. For trend trades, break-even should trigger when the price has moved favorably by a set percentage (e.g., 1-2%).
  4. RRR > 1:3: Ensure all trades have a minimum risk-reward ratio of 1:3 by setting stop-losses based on ATR and take-profits aligned with trend direction.
  5. Close by Friday: Use an exit rule to ensure all positions are liquidated before Friday’s close, even if the profit target has not been met.
  6. Consecutive Wins/Losses > 2: Monitor consecutive wins or losses to adjust position sizing or avoid overtrading during losing streaks.

  • Trend Trading captures long-term movements in strong markets.
  • Breakout Strategy profits from high volatility and sharp market moves.
  • Swing Trading adds flexibility by allowing trades in both trending and counter-trending situations.

This combination can help you build a well-rounded system, adaptable to various market conditions while maximizing your profit potential.