Writing your own trading rules without code
FxBotLab Auto Trader reads trading rules written as short sentences. You type them into the robot's inputs in MetaTrader 5; there is nothing to compile.
How a rule is written
Each condition compares two things on the last closed bar:
RSI(14) crosses below 30
Close is above EMA(200)
MACD(12,26,9) histogram crosses above 0
"is above" and "is below" check the closed bar. "crosses above" and "crosses below" are true only on the bar where it happened, compared with the bar before. A number or another indicator can be on either side.
What you can use
- Prices: Close, Open, High, Low
- SMA(period), EMA(period), RSI(period)
- MACD(fast,slow,signal) with macd, signal or histogram
- Bollinger(period,deviation) with upper, middle or lower
- Stochastic(k,d,slowing) with main or signal
- ATR(period), in pips
- ADX(period) with adx, plus or minus
- Donchian(period) with upper or lower, taken from the bars before the current one
The values are computed the way MetaTrader 5 computes its own indicators, so what you see on the chart is what the robot sees.
Putting a strategy together
Set Strategy to "My conditions". Fill in Buy1 to Buy3: a buy is opened when all of them are true. Do the same for Sell1 to Sell3; leave Sell1 empty for a buy-only robot. ExitBuy and ExitSell close a trade early, before the stop or target.
Example, buying pullbacks in an uptrend on gold:
Buy1: RSI(14) crosses below 35
Buy2: Close is above EMA(200)
Buy3: ADX(14) adx is above 20
ExitBuy1: RSI(14) is above 60
If a sentence cannot be read, the robot refuses to start and says which one, rather than trading something you did not mean.
Check it before it trades
Run it in the Strategy Tester in visual mode. The panel lists every condition and marks it true or false bar by bar, so you can see why a trade was or was not taken. Then give it a few weeks on a demo account.