Mutual Exclusion (Mutex) Implementation in MQL4

Introduction In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions; it is the requirement that one thread of execution never enters its critical section at the same time that another concurrent thread of execution enters its own critical section. In Algotrading, you may (more…)

This entry was posted by . Bookmark the . Titled

MetaTrader 4 Indicator to show Currency trend in Different Timeframes

Usage When trading, you probably have several windows open next to each other, different products, different time frames. Or, you have the same product but in different timeframes to see how it performs. I wrote this indicator so I can see for a given product, how it behaves in the different timeframes available by MetaTradre (more…)

This entry was posted by . Bookmark the . Titled

Looking back at 2018 and forward to 2019

Introduction Every year brings with it 365 opportunities to make a difference, so did 2018 and so will 2019. The last was very exciting and challenging. Since going live with my algorithmic strategies to the public, it a was a roller coaster. As soon as you expose your ideas and start getting an inflow of (more…)

This entry was posted by . Bookmark the . Titled

Implementing Trailing Stop Loss in MQL4

Cut your losses early, and let your winners runs.Trading circlesIntroductionThis is the most common quote you’ll probably hear in trading circles. Which basically means, that as soon as you open a position, you need to monitor it and make a decision against it or for it. When you move into the algotrading regime, I would (more…)

This entry was posted by . Bookmark the . Titled

How to Communicate Between MetaTrader Terminals using Files

Introduction Do you need different MetaTrader terminals to be able to communicate between themselves? Some reasons to implement this logic could be: Trading with different accounts which need to know on each other status. Trading with different brokers which needs to have the same orders open. Using one terminal to notify another terminal upon a (more…)

This entry was posted by . Bookmark the . Titled