Attachments forums

List of attachments posted on this forum.


All files on forums: 160923

Re: 🔺 MT5 XARD - Simple Trend Following Trading System

xard777, Tue Sep 09, 2025 7:40 am

TernaryLogic -- This is the Way...
When I’m waiting for a trade to pop up, I usually kill time with movies, TV shows, and YouTube vids.

The other day, while scrolling through a YouTube clip, they mentioned a new CPU ditching binary for ternary. At first, they described it as (0, 1, 2), and I thought, “Alright, that’s a step up from binary (0, 1),” but the vid wasn’t grabbing me, and I was ready to switch when—bam!—they flashed a diagram of something called Balanced Ternary. Well, that hooked me hard! They said this new chip’s hardcoded for Balanced Ternary Logic.

Now, I’ve spotted this logic in most of my MT4 and MT5 code—reckon it’s in about 90% of what I do. But instead of (0, 1, 2), it’s shown as Balanced TernaryLogic being (-1, 0, +1). Apparently, this could make the chip way faster and slash power use by up to 80%. I could see the AI energy angle, but more excitingly, I saw it as a software tweak for existing MT4/5 code—imagine a TernaryLogic library in the MT4/5 Include folder juicing up MQL4/5 code!

That was my lightbulb moment—old code lit up with faster processing and fewer loops. Total game-changer!

So, I went ahead and whipped up a TernaryLogic library file and overhauled all my code from the current setup.
Now I’ve got the foundation for my latest Xard Universe building block using TernaryLogic.

Word is, those sneaky lot at Weyland-Yutani (aka Microsoft) have already rolled out a TernaryLogic AI (BitNet b1.58) that’s open source.
https://medium.com/@armankamran/bitnet- ... 03b7d3c3bf
Just typical—those bastards will probably dominate this path (don’t get me started!).

Anyway, check out this link—it breaks down TernaryLogic: https://homepage.divms.uiowa.edu/~jones ... ogic.shtml

I reckon most coders will have a blast with this. I’m attaching my latest setup plus the TernaryLogic library file for you to dig into.
Enjoy!
Best,
Xard777

PS If any of you coders that are smarter than your average bear update the library file or code then please pay it forward and post it for us lesser mortals -- Thanks.

Watch this YT vid...
All files in topic