Momentum Optimisation

 02/01/25    10:21

Been working on the momentum code most of the day today and looks good now.  The functionality is mostly there.  From a small test this morning:

  1. The momentum system is working:
  • When momentum is high, we see larger reductions in MinLineDifference:
Required Difference: 0.036626 (Base: 0.046000 reduced by 20.4%) Momentum Factor: 20.4%

vs. low momentum:

Required Difference: 0.043217 (Base: 0.046000 reduced by 6.0%) Momentum Factor: 6.0%


So it is working but needs to be optimised again with the other key momentum parameters, which is where I am at right now.  Currently doing a 4 property optimisation with the new code to find the best configuration.  The properties are:

Property                        Description                                                                             Range
MinLineDifference        (Distance between lines before opening trade                         0.02 - 0.1     )
AngleBarsToCheck        (Number of bars to look back at to determine momentum     1-3                )
AngleWeight                  (Weighting % given to angle in the calculation                      0.5 - 1.0        )
MaxAngleDegrees         (Maximum angle used in the calculation                                0.15 - 0.45    )

MT4 is currently testing every possible cofiguration of these 4 parameters and is currently on test number 5750 and looks to be about a quarter of the way through..... could be a while.....

This was from the the AI after I requested to do an audit on the previous test:

Let me reorganize this analysis by directly looking at the trade log data you provided. Here are the key findings from analyzing all 128 trade records (64 positions open/close):

  1. Big Picture Issues:
  • Starting Balance: 10,000
  • Final Balance: 8,279.21
  • Total Loss: 1,720.79 (17.21%)
  1. Best Performing Trades:
  • Trade #122: +987.40 (Dec 19 05:00-21:00 Buy)
  • Trade #20: +691.64 (Nov 7-Nov 11 Sell)
  • Trade #96: +549.05 (Dec 9 Buy)
  1. Worst Performing Trades:
  • Trade #100: -353.07 (Dec 11 Sell - Stop Loss hit)
  • Trade #81: -268.44 (Dec 4 Buy)
  • Trade #60: -271.62 (Nov 27 Buy)
  1. Pattern Analysis: a) Stop Loss Hits:
  • Most stop losses occur during shorter-term trades (< 4 hours)
  • Often happen during trend reversals

b) Winning Trades:

  • Longest duration trades tend to be most profitable
  • Strong correlation between momentum and profit
  • Best trades typically last > 12 hours

c) Time-Based Patterns:

  • Most profitable trades start in early Asian session
  • Most losses occur during session transitions

  1. Key Loss Patterns:
  2. Quick Reversals:
    • Many losses come from trades that reverse shortly after entry
    • Often missing initial momentum confirmation
  3. Premature Stop Losses:
    • Several trades hit stop loss then move in intended direction
    • Current stop loss might be too tight
  4. Late Entries:
    • Some losses come from entering after major move already happened
    • Need better entry timing based on momentum


So I then asked......  

(it also should be 'action' #100 not 'trade #100 but the AI understands)

Let's target trade #100. Assess the factors associated with this loss and make addressing them the priority

Let me analyze trade #100 in detail:

98 2024.12.10 13:00 close 49 1.00 88.340 89.181 0.000 169.66 7911.21 99 2024.12.11 10:00 sell 50 1.00 87.451 88.006 0.000 0.00 7911.21 100 2024.12.11 11:30 s/l 50 1.00 88.006 88.006 0.000 -353.07 7558.14 101 2024.12.11 12:00 buy 51 1.00 88.146 87.591 0.000 0.00 7558.14

Key Observations:

  1. Trade was a SELL entry at 87.451
  2. Hit stop loss at 88.006 (555 pips move against position)
  3. Immediately after stop loss, EA opened a BUY position
  4. Entry to stop loss time was only 1.5 hours

Critical Issues:

  1. Direction Change Validation:
  • The quick flip from SELL to BUY suggests the white/red line cross may have been too marginal
  • Need to see actual momentum values at entry/exit
  1. Trade Timing:
  • 10:00 entry during transition from Asian to London session
  • Stop loss hit at 11:30 during peak London volatility
  1. Risk Management:
  • 555 pip loss is significantly larger than our typical losses
  • Position might have been opened with insufficient momentum confirmation

Let me analyze the indicator values around this trade: === Trade #100 Analysis === Entry to SL Movement: 0.5550 pips Time in Trade: 1.5 hours Post-SL Movement: 0.1400 pips Price Range: 0.6950 pips Average Movement per Hour: 0.3475 pips/hour Risk/Reward Ratio: 1.23


Proposed Solutions:
Add Session-Based Entry Filters:
Enhanced Momentum Validation:
Dynamic Stop Loss Adjustment:


But instead I've opted to do the full optimisation to see where we are once optimised. 

Comments

Popular posts from this blog

Stops and line based entry validation

Momentum

Strip back to core functionality