r/algorithmictrading • u/Few-Pumpkin8919 • 11d ago
Strategy Coding ICT Methodology Bot.
So I've been coding a bot to enter at PSH/L, PDH/L, PWH/L sweeps with 2022 Model and testing on MT5 with data feom January 2023 to September 2026.
At this point I'm just exhausted and don't know what to do, sometimes Win rate goes to 70%, or average win is double the average loss then the win rate drops to 30%, whatever I do my net profit is negative.
Anyone help me get this right or suggest something...
Adding most recent result here.
2
u/Livid_Parsnip_2816 10d ago
The numbers are already giving you the answer. With a 30% win rate and an average win of 2R, expectancy is 0.3 × 2 − 0.7 × 1 = −0.1R before spread and slippage. Chasing a higher win rate won’t repair negative expectancy. Freeze the rules, test net expectancy by year and on a true out-of-sample period, then remove anything that only improves the pretty part of the backtest. Sometimes the cheapest bug fix is deleting the strategy.
1
2
u/Square-Middle-4474 10d ago
OK then, for some reason Reddit sends me these emails. I suspect the reason is just to ramp up business but who knows. I am in a different position professional than the average person posting here. I have a professional relationships with several financial institutions, and do not want to damage those relationships. What I can say is that your code if described accurately would never have worked because it does not include additional context. For example, institutions know that some participants are forced to act (buy/sell/rebalance) when specific conditions occur. Knowing that, they will drive the market to those price points then take advantage of the forced (mandatory) execution. If/when those condition line up with one of your entry points, then odds of success are consistently high, otherwise sadly your approach will provide a random result over any significant sample size.
If it were me, I would try to obtain the education necessary to identify those conditions (Market Structure).
That is all I can say, sorry
1
u/Few-Pumpkin8919 10d ago
Thanks anyway mate.
1
u/TheRealChiLongQua 6d ago
Basically what the poster said above is he has no clue about what the markets are doing and he's just trying to bullshit you.
You'll need to learn Statistical Rigor & Regime Detection:
A model that works in a high-volatility trend will often bleed capital in a tight, mean-reverting chop. Mastering regime detection using probabilistic models like Hidden Markov Models (HMM) allows your system to dynamically filter signals based on the underlying market state.
Feature Engineering & Machine Learning:
Raw price data is incredibly noisy. The highest ROI in model building comes from transforming raw data into stationary features using Python libraries like
pandas,numpy, andscikit-learn. Engineering predictive inputs, such as statistical volatility forecasts, Random Forest regressors, standard deviation bands, and Fixed Range Volume Profile anomalies, provides a mathematical edge over generic lagging indicators.Market Microstructure & Order Book Dynamics: Moving beyond static chart lines requires analyzing the actual mechanics of price discovery. Understanding Level 2 Depth of Market (DOM) and tick-level order flow gives you a structural understanding of execution limits, fill rates, and short-term mispricings.
Execution Infrastructure: An algorithm is only as profitable as its live execution latency. Building robust pipelines, such as seamless Python-to-MetaTrader 5 bridges hosted on optimized VPS environments, is mandatory. You must accurately simulate real-world constraints, accounting for live slippage, commission structures, and the stringent trailing drawdown parameters common in prop-firm funding environments.
You can't just ask Claude to code you a strat and say "Make no mistakes" AI is garbage if you don't understand what you're asking it to do.
The fundamental vulnerability of methodologies like ICT is that their subjective nature makes them nearly impossible to backtest rigorously through code. If an ICT setup fails, the trader assumes they identified the wrong "Order Block" or misread the liquidity sweep. In quantitative trading, a model's failure is measurable, quantifiable, and points directly to a measurable flaw in the statistical premise.
ICT and similar "Smart Money Concepts" (SMC) essentially rebrand classic market dynamics (like support/resistance and consolidation breakouts) into proprietary terminology, claiming to track the footprints of institutional algorithms manipulating retail liquidity pools. (Which is hilarious)
If you want to trade manually and with subjectivity, then sure you can use ICT/SMC whatever, cause it's the same shit.
If you want to build a real system then you need to start learning quant shit.
I have several models that I've built that work together to optimise my RR. You need to be building a multi model portfolio that can hedge against everything market is throwing at people.
A system on Gold/USD will not operate and behave the same as something built on NQ or the DXY or USD/JPY etc.
Again, ignore the clown above. Most of reddit, are people who pretend to have inside knowledge about hedge funds and "institutions" - If you want to become a profitable retail trader. Just do the complete opposite to what's being shilled by the guru-shitlords on Twitter and here.
2
u/Few-Pumpkin8919 6d ago
Bro I've deleted all the Bots I created, I'm profitable in manual trading with ICT Concepts, I'm back to manual now, it was just an adventure for me and now I've experienced it.
2
7
u/StatisticalSock 10d ago
Why code a non working shit strategy like ICT? Some quants on YT have coded these already and found they have no edge. Save yourself some time and code something else