Ryan L Johnson
Ryan L Johnson
Futures & FX Strategist at Silk Road Trading LLC
Beginning on March 6, 2026 I am PROGRAMMING MQL5 INDICATORS, EA's, AND SCRIPTS FOR FREE as announced in my Blog.

I started out in the afterschool of hard knocks as a kid... Hog farm, trailer park, firewood, etc. but I got my hands on an Apple IIe computer early too. I ended up with an Associate of Science degree, a Bachelor of Science degree, a Minor in Sociology, a Juris Doctor degree, and a Certificate in Dispute Resolution later in life and began trading in 1999. My most valuable bits of education helpful to trading were probably Algebra, Geometry, Advanced Math I and II, Statistics, and Computer Math. That's Computer Science for the younger generation, or hey... just Programming for the next younger.

The retail trading industry is comprised of a multitude of central exchanges (NYSE, NASDAQ, CME, etc.), captive off-exchange markets (forex, CFD's, etc.), broker-dealers, hedge funds, investment banks, proprietary trading firms, HFT firms, pension funds, software providers, and data providers which take profits whether retail traders win or lose. The level of conflicting interests of commercial participants versus retail traders varies widely from one market to another. An important factor in developing a profitable trading strategy is choosing the best market(s) to trade.

Another important factor is, frankly, knowing what not to do. Professional traders and proprietary trading firms cap their risk per trade at 1 to 2% of account balance─because that time-tested approach has statistically proven to be the only way to stay profitable in the long-term. I like to refer to that rule as a risk-based law of diminishing returns. The problem for the overwhelming majority of beginning or inexperienced retail traders is the fact that they start with a small amount of trading capital. As a result, trading 1 to 2% of account balance is perceived as "not profitable enough" by those retail traders.

To be clear, that 1 to 2% is not a raw percentage of account balance. More accurately, that 1 to 2% is an unknown variable. We solve for that variable by dividing account balance by the money value of the distance between the entry price of a trade and that trade's stoploss price. The underlying premise is that we first determine where the stop needs to be to hold a trade versus jumping out of it (based on market conditions), and then allow the stoploss money value to determine our position size. We do not allow a raw percentage of account balance to determine an arbitrary stoploss distance─that would be, frankly, backward logic.

Also as a result of having limited capital, such retail traders are attracted to high risk strategies in hopes of receiving high returns. The widespread proliferation of Martingale (Martingarbage) or grid strategies among beginning or inexperienced retail traders serves as a prime example thereof. The more that you exceed the aforementioned risk-based law of diminishing returns, the faster that you will blow your account. The financially responsible way to grow your account is to simply follow the rule and allow your reasonable profits to add to your preexisting profits and your balance to grow naturally (details below).

If you have been dismissing strategies that you deem "not profitable enough" for say, the last 3 years, and you continue to lose money each year, it's time to acknowledge who and what you're up against and the statistical rule that they and it are following. I realize that this is an uncomfortable truth for most beginning or inexperienced traders. It means that you will not get rich quick and you may not even be able to trade certain markets having low leverage. The situation is what it is. Just imagine that if you had been aware of the rule when you started trading, say, 3 years ago, what your account balance would be at this very moment.

The rule also inherently invalidates about 99% of the strategies/EA's that you see online. The people who are selling that stuff are professional web marketers─not professional traders. The overwhelming majority of retail traders are beginning or inexperienced because the trader turnover rate is sky high. In that regard, the web marketers are simply responding to a massive target market of new traders that is glaringly obvious to the entire retail trading industry.

Here's a little known position sizing method to help with scaling up.

Let's assume that you have a simple entry and exit EA with a profit factor of 1.5, for example:

1. Run it through the Tester. Testing on the Real Ticks of your live broker-dealer's data is ideal if your machine's CPU and RAM can handle that. I prefer to run through 4000 round trades or more.
2. Read the Tester Report carefully. Additionally, use my custom ProfitByHourReportService (in my Blog, below) to analyze hourly profit by trade entries─not by trade exits as the native MT5 Tester Report does.
3. Pay particular attention to the months, days, and hours in which the EA is profitable.
4. Code a time filter that blocks entries during the worst times in the EA. See my millisecond-based "Trading Time Filter for Any MT5 Expert Advisor" code snippet (in my Blog, below).
5. Run a fresh backtest with the time filter implemented.
6. Examine the average count of consecutive loss trades─let's call this "NL".
7. Code automatic position sizing based on say, 1% of account balance, into the EA.
8. Code an exception to that 1% position size that triggers when NL+1 occurs (the EA has exceeded its average loss count).
9. Code an overriding minimum position size of say, 0.01, to operate when that exception occurs.
10. Code a resumption of 1% position sizing that triggers when one trade closes in profit.

Of course, additional backtests should be run as necessary following each code edit. The purpose of the process outlined above is to solve the mystery of attempting to predict when the EA's logic will be profitable versus unprofitable.

Arguably, the best way to track live prices, spread, slippage, etc. is to simply continue trading. Of course, it's nonsensical to continue on trading as if losing streaks don't exist─hence, the bottomed-out position size at the start of each losing streak. As soon as a tiny trade returns a profit, the balance-based position size is once again in effect. As a result the account balance grows, the default position size grows, the account balance grows─it's a viscious "profit loop." Get ready to add some zeros to the backend of your EA's net profit.

Having traded so many markets and instruments over the years, I now help beginning or struggling traders for free when they contact me. I have helped many other traders select a market, instrument, chart type, and strategy components without pushing commercial products on anyone... no strings attached. The one thing that we the retail traders can do, that commercial traders will not, is help each other for free. (I must admit... I have given free help to beginning fund managers).

And by the way, other people have identified me as a part-time comedian (above information excluded)... which I also admit.

Happy trading!🙂
Ryan L Johnson
The problem with automatic update downloads is that even if you click "No" in the update pop-up, the uninstalled update will hang--causing MT5 to malfunction. Beta Builds are not official Release Builds. Beta Builds are for user testing-- not live trading...
Ryan L Johnson
Added topic ECB President's name in a Calendar event
What is the point of including the sitting ECB President's last name in the name of an MT5 Economic Calendar event? As I'm calling specific Calendar events by name, I've created an input that allows the sitting ECB President's name to be changed
Ryan L Johnson
Added topic Forum Error
Is anyone else getting slow loading and/or this error message from this Forum in a web browser
Ryan L Johnson
Published post Stop Hunting in Forex. Is It Real?
Have you ever felt like you've been stop hunted, or is it just paranoia...
Ryan L Johnson
Ryan L Johnson
Just a quick word of advice for beginning traders...
It's more or less common knowledge that the holiday season is generally a bad time to be trading. Of course, the actual length of the bad trading season depends on the type of instrument and strategy that you're trading. Here are some example statistics in the form a bar chart from the MT5 Tester Report--for a strategy that places a trade every 1 to 2 days. This is a 6 year backtest. Rather obviously, we won't be trading in December nor January.
Ryan L Johnson
Published code ATR Cycles
A volatility filter based on 3 ATR's: a fast ATR, a middle ATR, and a slow ATR
· 1 5005 947
Ryan L Johnson
Here is perhaps the cleanest and most organized video instruction on how to code an MT5 EA based on an indicator by using iCustom(). This video is suitable for beginning MQL5 coders. This is not an endorsement of any broker. I do not use this broker, and I cannot use this broker in my location...
Ryan L Johnson
If you'd like to help stop about 400,000,000 non-upgradeable Windows 10 pc's from going into landfills, please sign the nonprofit petition at: https://pirg.org/take-action/tell-microsoft-to-extend-free-support-for-windows-10/ No donation is required. Please share this petition far and wide.🙏...
Ryan L Johnson
I've seen quite a bit of confusion about the activities of mql5.com Forum Moderators versus Administrators... versus the Service Desk, so I'll try to clear things up here. A Moderator is relegated to editing, censoring, and reorganizing the content of Forum Topics (threads) and Posts...
Ryan L Johnson
Added topic Some advice on issues with MT5 Beta build 5227
I recently reopened an old live FX account with my former FX broker-dealer which shall remain nameless here. Their Latest Release Version of MT5 was 5227 which created a bug that failed to import past tick data into the current bar in my Custom
Ryan L Johnson
Published code MACD Signal Line indicator for MT5
A stripped-down and colorized (signal line only) version of Metaquotes' MACD indicator from the MT5==>Indicators==>Examples folder.
· 1 7540 987
Ryan L Johnson
Published code Disconnect Alerts for MT5
Trade server disconnect alerts utility for MT5.
Ryan L Johnson
Here is a non-repainting ZigZag indicator that I converted from MT4 to MT5. This indicator is already posted in several Forum threads but is not easy to find. Although it works, compiles without errors, and runs fine in the Tester, the CodeBase validator will not accept it...
Ryan L Johnson
Added topic Home Network, PC, and MQL5 Code Security
Several forum users have reported hacking and malware intrusion into trading platforms and pc's, so the purpose of this thread is to give some guidance about security measures. No one knows everything, and I certainly never claimed to, so please post
Ryan L Johnson
Published code Show Positions on Custom Chart (or standard chart) for MT5
This indicator is a utility that shows labelled trade levels on any chart. If you want to replace your native trade levels on a native chart, then turn off "Show trade levels" in your F8 Chart Properties and attach this indicator. If you want to show trade levels on a Custom Chart (where native trade levels cannot be shown), then simply attach this indicator. BaseSymbol - specify the Symbol from which the trade level data will be pulled--handy for unique Custom Symbols. TextBarsBack - specify the number of bars back in history from the current bar where the level labels will be drawn. Note: Although magic number is referenced in the code, it is not presently included in the trade lines. If you're running multiple EA's on the same Symbol, you can edit the code to show magic numbers and then run multiple instances of the indicator on one chart. You can also edit the font sizes and text spacing in the object properties as needed for different display resolutions.
123