Re: 🔺 MT5 XARD - Simple Trend Following Trading System

1931
Lenovo wrote: Thu Apr 16, 2026 12:05 am Let's just say I'm not exactly a computer whiz, but if you want to, you can do it yourself. Just save the average with the value you need for as long as you need it. Sometimes the basics slip your mind—here's an example attached. I hope I understood what you wanted correctly.
So, save the value 192 for 1 minute on the 4M, 48, and 12 for the 15M.
Actually my post was about the different EMA values regarding timeframes (not an oblligation though) :

EMA 12 on the M15 timeframe
EMA 48 on the M4 timeframe
EMA 192 on the M1 timeframe

by changing value in code :

input string EMA16Settings = "<<<<==== EMA 16 Settings ====>>>>";
input bool showEMA16Line = true;
int EMA16Period = 12;
input color EMA16ColorDown = clrRed;
input color EMA16ColorUp = clrLime;
input int EMA16Width = 3;
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

1932
Apparently, both semaphore and EMA work better when adjusted periods are based on target minutes
Best,
Xard777

So a simpler calculation would be...
int tf = PeriodSeconds(Period()) / 60; // Get timeframe in minutes

// Calculate adjusted periods based on target minutes
int targetMinutes1 = 60; // 1 hour
int targetMinutes2 = 240; // 4 hours
int targetMinutes3 = 960; // 16 hours
int targetMinutes4 = 3840; // 64 hours

adjustedSEMA1per = targetMinutes1 / tf;
adjustedSEMA2per = targetMinutes2 / tf;
adjustedSEMA3per = targetMinutes3 / tf;
adjustedSEMA4per = targetMinutes4 / tf;

// For EMAs: 240/TF
adjustedEMAper = 240 / tf;

This automatically handles any timeframe and ensures consistent minute-based calculations.
These users thanked the author xard777 for the post (total 3):
mirfai, SOLESHOE, eduarescobar
XARD: If Carlsberg made charts... Probably the best charts in the world

Re: 🔺 MT5 XARD - Simple Trend Following Trading System

1933
xard777 wrote: Thu Apr 16, 2026 4:08 am Apparently, both semaphore and EMA work better when adjusted periods are based on target minutes
Best,
Xard777

So a simpler calculation would be...
int tf = PeriodSeconds(Period()) / 60; // Get timeframe in minutes

// Calculate adjusted periods based on target minutes
int targetMinutes1 = 60; // 1 hour
int targetMinutes2 = 240; // 4 hours
int targetMinutes3 = 960; // 16 hours
int targetMinutes4 = 3840; // 64 hours

adjustedSEMA1per = targetMinutes1 / tf;
adjustedSEMA2per = targetMinutes2 / tf;
adjustedSEMA3per = targetMinutes3 / tf;
adjustedSEMA4per = targetMinutes4 / tf;

// For EMAs: 240/TF
adjustedEMAper = 240 / tf;

This automatically handles any timeframe and ensures consistent minute-based calculations.
Anyone has made this modification ?
possible to share ?
Thx
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

1935
XU Effect 7.98 has Header display refresh problems.
If you display Header M15 on M15 TF and save your template,
whenever you reload the template on M1 TF, you get M1 displayed over M15.
if you then disable Header display, M1 disapear but M15 remains (and doesn't appear in MT5 Objects List)...

XARD: Whenever you create a template on MT5 you first have to use the clean screen script then save your template.
SOLESHOE: i did start with an empty page to start my new template, adding each element one by one.
XARD: If you are running both Effect + EMA Candles then switch header on EMA Candles to false
SOLESHOE: no EMA. here a M4 graph screenshot of M1 created template, after deleting every single indicator in list
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

1940
SOLESHOE wrote: Tue Apr 21, 2026 12:52 am Nice Template! would you mind sharing it ?
That is the MT4 version I have. I can share the XU-effect and AlligatorEMAlines as they are shared by XARD and members of this forum. Other MT4 indicators are just XARD's original work from different versions. I think it is easy to search in the forum. (sorry about the version that I renamed)

P.S. for the XU-effect I slowed down the heartbeat from1 second to 3 seconds.
These users thanked the author horizon202 for the post (total 2):
SOLESHOE, ManilaSpurs