A practical guide · MetaTrader 5

Turn what you already trade into rules a machine can run.

Most strategies live in a trader's head as a feel for what usually works. This page is about the unglamorous part — writing that feel down as conditions precise enough that software can check them the same way every time.

Rule translator
How you say it

"Wait for structure to break, then buy the pullback into the zone."

How it has to be written
# both must be true, in order break_of_structure = confirmed retrace_into_zone = true zone_type = order_block direction = long
How you say it

"I only trade the London session, and never in the first ten minutes."

How it has to be written
# server time, not your local clock session_start = 08:10 session_end = 12:00 timezone = broker_server outside_session = no_entries
How you say it

"I risk about one percent, give or take, depending on the setup."

How it has to be written
# "give or take" is not a rule risk_percent = 1.0 lot_calculation = from_stop_distance round_lots_to = 0.01 min_stop_pips = 15
How you say it

"I stay out around big news because the spread goes crazy."

How it has to be written
# define "big" and define "around" news_filter = on impact_level = high minutes_before = 30 minutes_after = 15
How you say it

"After a couple of bad trades I stop for the day and walk away."

How it has to be written
# "a couple" needs a number max_losses_per_day = 2 max_trades_per_day = 5 on_limit_reached = halt_until_next_day

Every line on the right is something you decide. The software has no opinion about any of it.

Why bother

A rule you can't write down is a rule you aren't really following

Discretionary trading feels consistent from the inside. You believe you take the same setup every time. But "the zone looked clean" on a Tuesday morning and "the zone looked clean" after three losses on a Friday afternoon are not the same judgement, and no amount of discipline fully closes that gap.

Writing the strategy down as conditions does two things. It forces you to discover which parts of your edge you can actually define — and that is often uncomfortable, because some of it turns out to be vague. And once it is defined, it can be tested, reviewed and executed identically whether you are watching or not.

This is not a claim that automation makes a strategy profitable. A badly defined strategy automated is just a badly defined strategy executed faster. The point is consistency, not performance.

The method · five steps

How to convert a strategy into rules

Work through these in order. Each step depends on the one before it, and skipping ahead is the most common reason an automated strategy behaves nothing like the manual one.

STEP 01

Write the strategy in plain sentences first

Before touching any software, describe what you do in ordinary language, as if explaining it to another trader. Do not try to be precise yet. The goal is to get the whole thing out of your head and onto a page, including the parts you do by instinct.

Most people discover at this stage that their strategy has three or four conditions they were aware of, and two or three more they were applying without noticing.

STEP 02

Find every word that means "it depends"

Go through your sentences and underline anything a computer could not check. Words like clean, strong, decent, obvious, usually, around, a bit, if it looks right. Each of these is a decision you are making without a rule.

This step is where most of the real work happens. Every vague word has to become either a number, a boolean, or an explicit exclusion.

Vague

"Enter when the pullback is decent and momentum still looks strong."

Defined
retrace_min_percent = 38 retrace_max_percent = 79 momentum_check = higher_low_present
STEP 03

Separate entry conditions from filters

An entry condition is a reason to trade. A filter is a reason not to. Mixing them together produces rule sets that are hard to test, because when results are poor you cannot tell whether the entry logic is weak or a filter is blocking good trades.

Keep two lists. Entry conditions describe the setup itself — structure, zone, pattern. Filters describe the environment — session, news, spread, day of week, how many trades you have already taken.

STEP 04

Define the exit before you define the entry

Entries are more interesting to think about, which is why most people write them first and leave exits half-finished. But the exit determines the risk, and the risk determines the position size, so the exit has to be settled before anything else can be calculated.

Decide where the stop goes and why. Decide whether the target is fixed, structure-based, or trailing. Decide what happens when neither is hit by the end of the session.

Vague

"I move to breakeven once it's in decent profit, then let it run."

Defined
breakeven_trigger = 1.0R breakeven_offset = 2 pips trail_after = 1.5R trail_distance = 20 pips
STEP 05

Test on demo before anything else

Run the rule set on a demo account for long enough to see it behave in conditions you did not anticipate. You are not looking for results at this stage. You are looking for the gap between what you meant and what you wrote.

Expect that gap to exist. It always does the first time. Watch for trades the software took that you would not have, and setups you would have taken that it skipped — each one points at a condition that is defined wrongly or not at all.

Worked example

One strategy, written out completely

This is a structure-based setup taken through all five steps. It is here to show the level of detail required, not as a strategy to copy — the numbers are illustrative and mean nothing outside the context they were chosen for.

Strategy definition · structure pullback
plain_description
Wait for a break of structure, then enter on the retrace into the origin zone. Step 01 — written before anything was made precise
timeframe
M15 for entries, H1 for bias
entry_condition_1
Break of structure confirmed by close, not wick
entry_condition_2
Price returns into the origin zone of the impulse
entry_condition_3
Zone has not been touched before this retrace
filter_session
08:10 – 12:00 broker server timeStep 03 — a reason not to trade, kept separate
filter_news
No entries 30 minutes before or 15 after high-impact events
filter_daily_limit
Halt after 2 losses or 5 trades, whichever comes first
stop_loss
Beyond the far edge of the zone, minimum 15 pipsStep 04 — settled before position size
take_profit
Previous swing point in the direction of the break
breakeven
Move stop to entry + 2 pips once 1.0R is reached
position_size
Calculated from stop distance so risk equals one percent of balance
end_of_session
Close any open position at 12:00 regardless of state

Notice how much of this has nothing to do with the entry. Roughly two thirds of a workable rule set is filters and exits — the part most traders leave undefined.

Watch for these

Where conversions usually go wrong

Adding conditions until the past looks good

Every filter you add makes historical results tidier and the rule set less likely to hold up on data it has not seen. If a condition cannot be justified by why the setup works, it probably should not be there.

Writing rules the platform cannot check

Some things you see on a chart are genuinely hard to express — the shape of a consolidation, the character of a move. Either find a measurable proxy or accept that part stays manual.

Using your local clock

Sessions have to be defined in broker server time, which is often two or three hours off from yours and shifts with daylight saving. This single mistake silently changes which trades the rule set is even allowed to see.

Forgetting the position you already hold

A rule set that only describes entries will happily open a second and third trade on the same signal. Define what happens when a position is already open before you run anything live.

Testing on default spread

Demo conditions are usually kinder than live ones. Test with a spread and commission model close to what your broker actually charges, or the results describe a market you cannot trade in.

Changing settings mid-test

Adjusting parameters while a test is running restarts the evidence without restarting the clock. Decide the rule set, run it untouched for a defined period, then review.

The software

Thunderbot runs the rule set you wrote

Once your strategy is defined, something has to execute it. Thunderbot is an Expert Advisor for MetaTrader 5 that holds the conditions from the method above and checks them on every bar, on your own terminal.

What it is
platformMetaTrader 5
typeExpert Advisor (.ex5)
runs_onYour terminal or VPS
entry_conditionsYou define
stop_lossYou define
take_profitYou define
lot_sizeYou define
session_hoursYou define
daily_limitsYou define
detection_modulesStructure · zones · patterns

It does not send signals, does not give advice, and has no access to your trading account. Your broker relationship and your capital stay entirely with you.

$30per week

Renews weekly. Cancel any time — no minimum term.

  • Full Expert Advisor, all detection modules unlocked
  • One-day setup session, at no extra cost
  • Written onboarding guide covering every parameter
  • Help configuring your first rule set
  • Activity logs so you can review what it evaluated

We reply on WhatsApp during business hours.

Download the Expert Advisor

ThunderbotsV_13.ex5 · MetaTrader 5 · A licence key is required to activate it.

Download .ex5

Prices are in US dollars. A MetaTrader 5 terminal from your own broker is required and is not included. The licence covers the software only — it does not include trading capital, a broker account, or any managed service.

Questions

Before you ask

No. The method on this page is about defining rules in plain terms and then entering them as settings. The software exposes them as fields and toggles rather than as code.

It only evaluates conditions you have switched on, using values you entered. A disabled module is never checked. It will not act outside the session hours or daily limits you set.

No. Nothing here is a recommendation to buy or sell anything. We do not provide signals, do not manage money, and have no access to your trading account. The method is a way of writing your own strategy down; the software executes your own configuration.

No, and anyone telling you otherwise is selling something. Automation makes execution consistent. If the underlying strategy has no edge, consistent execution of it will not create one. Trading involves substantial risk of loss.

Any symbol available on your broker's MetaTrader 5 terminal. The symbol is a setting you choose, not something built into the software.

The licence is $30 per week, with the setup session and onboarding guide included. It renews weekly and you can stop at any time — the licence then runs to the end of the paid week and deactivates. See the refund policy for details.

A MetaTrader 5 terminal from your broker, running on a machine or VPS that stays online while you want the software active.

Risk disclosure

Thundersoftware publishes a software tool. Nothing on this website or inside the software is financial advice, investment advice, or a recommendation to buy or sell any instrument. We do not manage money, hold client funds, or have access to your trading account.

Trading financial markets involves substantial risk of loss and is not suitable for every individual. Past performance does not indicate future results. Any figures or settings shown on this page are illustrative and are not a projection of any outcome. You are responsible for the rules you configure and for evaluating your own strategy and risk tolerance.

Chat with us