The code was modified a bit, I modified it with AI, at least it worked when I tested TF_find_in with the 1 month setting, even on TF M1
AI: Walkthrough - Non-Repainting Inside Bar Stops
I have successfully modified and compiled the inside bar indicator to be completely non-repainting.
Changes Made
1. Restricted Inside Bar Detection to Closed HTF Bars
In
!!!-MT5 X-XARDg-INSIDE BAR stops button 1.03.mq5
, we changed the main loop of start2 to only run inside bar detection when i > 0 (completed bars). The live forming bar i == 0 is bypassed for detection and only undergoes signal propagation, ensuring the indicator will never repaint.
2. Restored State History during Recalculations
When prev_calculated > 0, the indicator recalculates a small buffer window (limit = length + 5). Previously, it set len = 0, cutting off active stop lines that had started before that limit. We implemented a backward-search loop from limit + 1 up to limit + length to find any active inside bar and restore the state of len, LastHigh, and LastLow correctly.
3. Safer Signal Propagation
Instead of propagating values from the previous buffer index (HighBuff[bar_now + 1]), which can occasionally contain EMPTY_VALUE if there are history gaps or resets, we now copy directly from LastHigh and LastLow.
If you downloaded the previous one, you've already noticed the new repainting/recalculating
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2032Changes Made
1. Restricted Inside Bar Detection to Closed HTF Bars
In
!!!-MT5 X-XARDg-INSIDE BAR stops button 1.03.mq5
, we changed the main loop of start2 to only run inside bar detection when i > 0 (completed bars). The live forming bar i == 0 is bypassed for detection and only undergoes signal propagation, ensuring the indicator will never repaint.
2. Restored State History during Recalculations
When prev_calculated > 0, the indicator recalculates a small buffer window (limit = length + 5). Previously, it set len = 0, cutting off active stop lines that had started before that limit. We implemented a backward-search loop from limit + 1 up to limit + length to find any active inside bar and restore the state of len, LastHigh, and LastLow correctly.
3. Safer Signal Propagation
Instead of propagating values from the previous buffer index (HighBuff[bar_now + 1]), which can occasionally contain EMPTY_VALUE if there are history gaps or resets, we now copy directly from LastHigh and LastLow.
1. Restricted Inside Bar Detection to Closed HTF Bars
In
!!!-MT5 X-XARDg-INSIDE BAR stops button 1.03.mq5
, we changed the main loop of start2 to only run inside bar detection when i > 0 (completed bars). The live forming bar i == 0 is bypassed for detection and only undergoes signal propagation, ensuring the indicator will never repaint.
2. Restored State History during Recalculations
When prev_calculated > 0, the indicator recalculates a small buffer window (limit = length + 5). Previously, it set len = 0, cutting off active stop lines that had started before that limit. We implemented a backward-search loop from limit + 1 up to limit + length to find any active inside bar and restore the state of len, LastHigh, and LastLow correctly.
3. Safer Signal Propagation
Instead of propagating values from the previous buffer index (HighBuff[bar_now + 1]), which can occasionally contain EMPTY_VALUE if there are history gaps or resets, we now copy directly from LastHigh and LastLow.
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2033I sometimes get a huge LAG on graph, aven if only one GRAPH is running, with XU-51 (it also occured with XU-49) - i suspect when market transactions volume gets high.
Symptims are :
Candles updating very slowly, while current price line and Panels Datas update correctly..
i sometimes also have MT5 disconnection (Candle Timer and graph freezed in Pannel) and i need to force MT5 reconnection to servers to reactivate Graph update.
I am using MT5 VPN servers.
would it be insufficient power on my laptop ?
Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz (2.21 GHz)
8,00 GB
Intel(R) Iris(R) Graphics 540 (128 MB)
Symptims are :
Candles updating very slowly, while current price line and Panels Datas update correctly..
i sometimes also have MT5 disconnection (Candle Timer and graph freezed in Pannel) and i need to force MT5 reconnection to servers to reactivate Graph update.
I am using MT5 VPN servers.
would it be insufficient power on my laptop ?
Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz (2.21 GHz)
8,00 GB
Intel(R) Iris(R) Graphics 540 (128 MB)
Video games are like merguez sausages; it's better not to know how they're made so you can continue to enjoy them.
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2034Those specs should be ok, I would check the servers by ping from connection status tab bottom right of screen and maybe see if disabling VPN made a difference.SOLESHOE wrote: Fri Jun 19, 2026 7:46 pm I sometimes get a huge LAG on graph, aven if only one GRAPH is running, with XU-51 (it also occured with XU-49) - i suspect when market transactions volume gets high.
I am using MT5 VPN servers.
would it be insufficient power on my laptop ?
Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz (2.21 GHz)
8,00 GB
Intel(R) Iris(R) Graphics 540 (128 MB)
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2035SOLESHOE wrote: Fri Jun 19, 2026 7:46 pm I sometimes get a huge LAG on graph, aven if only one GRAPH is running, with XU-51 (it also occured with XU-49) - i suspect when market transactions volume gets high.
Symptims are :
Candles updating very slowly, while current price line and Panels Datas update correctly..
i sometimes also have MT5 disconnection (Candle Timer and graph freezed in Pannel) and i need to force MT5 reconnection to servers to reactivate Graph update.
I have similar issues as Soleshoe! Only durring the bussiest times. It was real bad with v49 but much better with v51. I run the full version without dropping any of the indicators. v51 is very good. I can at least trade it by watching the current price data.
I'm running Windows 10, Intel Core I7 (3.4 GHz), 32 G ram and GPU 2G.
I also noticed that in the Live Data Stream panel the Vacuum stays at 100% VACUUM, and Power at Wound Spring (100%). It only changes when the market in shut down, like today when they shut down the US market at around 10 AM PDT because of the Holiday. It is currently reading MED (80%). I like v51 as most everything works and the look is great.
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2036I see some of you are having lag problems, let me post a simpler version for you
Give me a day
Xard777
Give me a day
Xard777
XARD: If Carlsberg made charts... Probably the best charts in the world
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2037Maybe it's me who can't find the right moment to trade with the standard values or it's just a habit of observing the different values, those I used on mt4 9,36,144 and 576. It seems that the circle/arrow and large dot for the combination of the third point is more visible. I'll give an example yesterday if I had wanted to wait as in the first graph above, the circle/arrow and large dots to sell would never have happened, which is what happened in the photo below with the values mentioned, moreover I would have had the opportunity for a second sell, so am I the one who didn't understand how to use the system? I hope you managed to explain me well, I'm looking for advice
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2038Dear - you're still on M1. I don't like to interfere in people's way of thinking or learning processes, but you won't find peace as long as you keep trying to find an edge on M1 with volatile and manipulated assets like gold and crypto. My suggestion is always the same, go up to M30/H1 and get used to charts where the trends are more stable.Lenovo wrote: Sun Jun 21, 2026 4:30 am Maybe it's me who can't find the right moment to trade with the standard values or it's just a habit of observing the different values, those I used on mt4 9,36,144 and 576. It seems that the circle/arrow and large dot for the combination of the third point is more visible. I'll give an example yesterday if I had wanted to wait as in the first graph above, the circle/arrow and large dots to sell would never have happened, which is what happened in the photo below with the values mentioned, moreover I would have had the opportunity for a second sell, so am I the one who didn't understand how to use the system? I hope you managed to explain me well, I'm looking for advice
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2039Don't worry, I accept everything, in fact, if it weren't like that I would avoid writing and pointing out when it's a losing proposition, I would boast about earnings but it wouldn't help me at all, in the years that I've been in this world I've never earned, in fact I've always lost and not a little, I accept all criticisms and advice, I want to clarify when I show the one-minute chart it's not that I always look for and observe the one-minute chart, I look at the 15-minute or clockwise chart, I only look for the one-minute arrow instead of looking at the small dot on the 15-minute chartCagliostro wrote: Sun Jun 21, 2026 6:04 am Dear - you're still on M1. I don't like to interfere in people's way of thinking or learning processes, but you won't find peace as long as you keep trying to find an edge on M1 with volatile and manipulated assets like gold and crypto. My suggestion is always the same, go up to M30/H1 and get used to charts where the trends are more stable.
![]()
Re: 🔺 MT5 XARD - Simple Trend Following Trading System
2040I took into account the small dot on the 30 minutes below the white average