Do you have any other ideas?
The following indicator can be used in 2 ways. You can use it in the ranging way as described in the CodeBase:
Ryan L Johnson, 2025.11.08 14:29
A volatility filter based on 3 ATR's: a fast ATR, a middle ATR, and a slow ATRHi Fred87K!
I'm also a hobby trader living in Chiang Rai, Thailand. My English is not so good, but I really like your challenge! I am also trying to make my own EA using AI, and I feel your pain about "trend trap".
For HOLO strategy, range filters are really difficult. Have you tried "ADX" with a specific level? For example, only trade when ADX is below 20 or 25.
Also, in my experience, the "Currency Strength Meter" idea is sometimes good. If many currencies are moving same way, it's a trend. If they are messy, it's a range. Maybe checking the strength of USD and Gold separately could help for XAUUSD?
I'm a beginner too, so let's study hard together! Good luck with your coding!
Hi!
To be honest, I am a beginner trader and a complete novice when it comes to coding. But I like new challenges and I'm curious to discover new things.
With the help of Gemini and Claude AI, I am trying to develop a trading robot that uses the HOLO strategy (“High Open, Low Open”).
This is a mean-reversion strategy ( return to the average ? Sorry for traduction ), so it only works in ranging markets. Trends must be avoided.
For a buy:
We define a zone of interest between the low of the day and the upper level of the open of the last 1-hour candle. When the price opens a candle (1M, 5M, 15M, or 30M, depending on what we choose) inside this zone and then breaks above the upper boundary, we open a buy trade.
For a sell:
The zone of interest is defined between the high of the day and the lower level of the open of the highest recent 1-hour candle. When the price opens a candle inside this zone and then exits the zone to the downside, we open a sell trade.
A picture is worth a thousand words.
Naturally, the area of interest evolves throughout the day, when the day's high/low is exceeded, and when a 1H candle opens higher, lower.
I will now explain what I am trying to do, and I would like advice on what is not working, because at the moment the robot is not profitable. I would like to know whether this comes from the strategy itself or from my lack of skill (I am a beginner).
From midnight, we define the day’s high and low, then we wait for the opening of the first 1-hour candle to define the initial zones.
Here is an example on TradingView, with the HOLO indicator:
Red arrows shows BUY/SELL. This is the ideal situation we are looking for.
The robot places a buy/sell order as soon as the tick touches the boundary.
The stop loss can be placed in different position: either at the top/bottom of the zone, at the high/low of the candle, or at 50% of the zone. This needs to be backtested to determine what works best.
The take profit is adjustable, but a 2:1(2× SL) gives better results.
Break-even is set at 1R.
Trailing stop: optional, mainly for backtesting, but it gives worse results when enabled.
Add a trend detector, a filter that prevents trading in order to avoid consecutive stop losses. To avoid this type of situation:
Here is a second example of what we do NOT want;
The market is trending, and we get a series of stop losses.
So my main question is: What is the best solution to avoid this type of situation?
My idea would be to add a filter that detects when the market is trending and forbids trading. Obviously, but there is many different indicator and i don't know all of them. I'm trying with ADX, and soon i will try with a Bollinger.
Do you have any other ideas?
i face an issue maybe same before and solved it by using ADX combined with a defined range between the H4 high and low to measure trend strength
that because i was working with small timeframe
with you good luck!
Great question, and honestly: respect for diving into both trading and coding at the same time. That’s not easy, and what you’ve described is already much more structured than most beginner attempts.
Your understanding of HOLO is basically correct. It’s a mean-reversion, intraday strategy that works best in ranging markets and breaks down badly in trends. So the fact that your EA is not profitable yet does not automatically mean your coding is wrong or that the strategy is useless.
The situation you showed in your second example (series of stop losses) is exactly where HOLO fails by design. When the market trends, daily highs keep getting higher or daily lows keep getting lower, and there is no “snap back to the mean”. In those conditions, any HOLO variant will bleed.
Adding a trend filter is the right idea, but relying only on classic indicators like ADX or Bollinger Bands is often not enough. ADX reacts late, and Bollinger Bands can be misleading because price can ride the band during strong trends.
What usually works better in practice is a combination of filters, not a single indicator:
• Time-of-day filter: Avoid the first 1–2 hours of London and New York open. Many HOLO losses come from session breakouts.
• Daily range filter: If today’s range is already, for example, >60–70% of the average daily range, skip trading for the day. Trend days expand early.
• Consecutive loss lockout: After 2 losses in the same direction or 3 losses total, disable trading for the rest of the day. Robots should protect themselves.
• Structure filter (better than indicators): If the last few H1 candles show clear higher highs/higher lows (or lower lows/lower highs), don’t trade. This often detects trends earlier than ADX.
• Distance-from-mean filter: HOLO works best when price is clearly stretched away from the mean (VWAP, H1 MA, etc.). If price is too close, expectancy drops.
Regarding trade management: your observation is correct. Break-even at 1R is fine, fixed TP around 1.5R–2R usually works better than trailing stops, and stops placed beyond the zone or candle extremes tend to outperform “mid-zone” stops.
Bottom line:
Your main issue is almost certainly over-trading on trend days, not a fundamentally broken strategy or lack of intelligence. HOLO lives and dies by when you don’t trade.
You’re actually doing the right thing by questioning filters and regime detection. That’s exactly the step most people never reach.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
To be honest, I am a beginner trader and a complete novice when it comes to coding. But I like new challenges and I'm curious to discover new things.
With the help of Gemini and Claude AI, I am trying to develop a trading robot that uses the HOLO strategy (“High Open, Low Open”).
This is a mean-reversion strategy ( return to the average ? Sorry for traduction ), so it only works in ranging markets. Trends must be avoided.
For a buy:
We define a zone of interest between the low of the day and the upper level of the open of the last 1-hour candle. When the price opens a candle (1M, 5M, 15M, or 30M, depending on what we choose) inside this zone and then breaks above the upper boundary, we open a buy trade.
For a sell:
The zone of interest is defined between the high of the day and the lower level of the open of the highest recent 1-hour candle. When the price opens a candle inside this zone and then exits the zone to the downside, we open a sell trade.
A picture is worth a thousand words.
Naturally, the area of interest evolves throughout the day, when the day's high/low is exceeded, and when a 1H candle opens higher, lower.
I will now explain what I am trying to do, and I would like advice on what is not working, because at the moment the robot is not profitable. I would like to know whether this comes from the strategy itself or from my lack of skill (I am a beginner).
From midnight, we define the day’s high and low, then we wait for the opening of the first 1-hour candle to define the initial zones.
Here is an example on TradingView, with the HOLO indicator:
Red arrows shows BUY/SELL. This is the ideal situation we are looking for.
The robot places a buy/sell order as soon as the tick touches the boundary.
The stop loss can be placed in different position: either at the top/bottom of the zone, at the high/low of the candle, or at 50% of the zone. This needs to be backtested to determine what works best.
The take profit is adjustable, but a 2:1(2× SL) gives better results.
Break-even is set at 1R.
Trailing stop: optional, mainly for backtesting, but it gives worse results when enabled.
Add a trend detector, a filter that prevents trading in order to avoid consecutive stop losses. To avoid this type of situation:
Here is a second example of what we do NOT want;
The market is trending, and we get a series of stop losses.
So my main question is: What is the best solution to avoid this type of situation?
My idea would be to add a filter that detects when the market is trending and forbids trading. Obviously, but there is many different indicator and i don't know all of them. I'm trying with ADX, and soon i will try with a Bollinger.
Do you have any other ideas?