ScalpEA v2 - FVG scalping EA with machine learning options
Hi, here I will try to add any usefull informations about my bot. My set files are attached here.
If you want to try it on whatever you might like, try it on DEMO first. I am testing it on EURUSD pair but it is not that good as on XAUUSD but on EURUSD you can use both bearish and bullish FVG, for Gold I recommend keeping shorts turned off or let us know if you find some better config for gold.
I am running all attached configs on my real accounts which you can find on my myfxbook MartinSMGcz.
Offline FVG database creation. I am not using it but you could find a way on how to use it for better outcome.
- Download H1 candles of you instrument for example EURUSD and name it "EURUSD-ECN_H1_202101070000_202510271500" (default format of MT5 export)
- Create python script. (build_fvg_db_with_score_EURUSD.py)
- Run python script. (this will generate output database)
Python script: (I will attach example script and output database)
you only edit these two lines:
# === CONFIG PARAMETERS ===
input_file = "EURUSD-ECN_H1_202101070000_202510271500.csv"
output_file = "fvg_database_EURUSD.csv"
Input file format is:
<DATE> <TIME> <OPEN> <HIGH> <LOW> <CLOSE> <TICKVOL> <VOL> <SPREAD>
2021.01.07 00:00:00 1.23245 1.23437 1.22443 1.22687 110583 0 0
2021.01.08 00:00:00 1.22695 1.22839 1.21925 1.22187 123222 0 0
Output file format is:
timestamp,isBull,gap,top,bottom,score
2021-01-11 00:00:00,False,0.0019499999999998963,1.22443,1.22248,0.2627526467757328
2021-01-18 00:00:00,False,0.0024399999999999977,1.21105,1.20861,0.0
Config names explained:
"vt" stands for VT Markets 1:500 leverage broker.
"purple" stands for Purple Trading EU broker with 1:30 leverage. Settings are for CZK currency, for EUR multiply size by 25. (means 0,6 = 25)
Configs:
- STD - base config version I use, good profit : risk ratio.
- HC - it is STD version with bigger volume uset for each trade
- SHC - Very high risky, using trailing TP and bigger positions, with limitations on one trade at a time. Based on backtests it works only since the beginning of 2025!
When used on 1:500 it has potential of profit: (based on my 3 months of trading on real accounts)
- STD: 33% per month
- HC: 55% per month
- SHC almost 70% per month
Honestly it works since 10/2023 when gold started to be more bullish htan before. I am not sure how long it will keep working like this but I was told it could work for 1-2 years. After that, it might not work as good as it works now but who knows these days.
After few failed trades, I added "3 candles in the same direction" filter, "wick size in opposite direction check on candle 2". These two filter eliminates the loses, but it even limits detected trade opportunities. All filter could be turned off in configs.
My recommendation:
- Let it work for a few weeks and when your profit will equal to your initial depost make a withdrawal.
- After return of your initial deposit, let your profit make more profit.
Errors:
- retcode=10027 -> Means that you have Algoritmic trading disabled. Allow it in MT5 settings.



