It looks like I accidentally stumbled into a scalping strategy. I posted the rules near the top of the page for those that don’t care about how I developed the expert advisor.
Warning: this EA cannot possibly profit on wide spreads. Do not follow this method if your broker’s spread and execution slippage average more than 2 pips.
Scalper EA Trading Rules
Chart: EURUSD 5 minute
SMA Period: 200
Moving Average Envelope: 1.0% of the SMA
Style: Counter-trend scalper
Entry rules
If the price crosses and closes below the lower envelope, then buy at market.
If the price crosses and closes above the upper envelope, then sell short at market.
Exit rules
If the price crosses and closes above the lower envelope, then exit long at market.
If the price crosses and closes below the upper envelope, then exit short at market.
Notice that the scalper strategy uses the same envelope for entry as it does for exit. The distribution of distance around the moving average is sticky when the price extends far away from the SMA.
Get the code for MetaTrader 4 or NinjaTrader
Why the strategy works
The original intent for this research sought to uncover a range trading strategy based on the price crossing the moving average. Most traders think of distance in terms of pips.
Pips are valid for general context. The problem with modeling a strategy based on pips is that the the meaning of one pip’s movement changes over time.
Taking the idea to extreme lengths, the value of a pip in 1999 when the euro launched around 0.80 hardly compares with today’s price of 1.30. Keeping the discussion to percentages helps to fix the meaning of an idea like 100 pips over long periods of time.
I wanted to visualize how the price generally behaves relative to the moving average. A custom NinjaTrader indicator that my programming team wrote collects and analyzes the data in an Excel spreadsheet. Excel allows me to draw a graph of how frequently the price stretches away from the 200 period simple moving average.
The slope of the curve bends as the price extends further from the moving average. As you move left to right along the horizontal axis, the slope is steep until 0.75%. A kink in the curve forms at that point. The slope of the line flattens substantially from that point onward.
A big slope implies that the price will be anywhere but here on the next bar. A flat line means that the price isn’t likely to go anywhere. The distance is sticky at that level.
Scalping in a moving market doesn’t make sense. It’s only when we identify the sticky price condition of 1% away from the moving average that running a scalper EA makes sense.
Scalper EA Backtest results
I developed the strategy in NinjaTrader using data from 2011. My blind period was 2012, which was data that the strategy never saw in development. It was a pure walk forward test.
Results without spread costs
Profit: $5,740 on 108 trades trading 1 standard lot per signal
Profit factor: 2.18
Percent accuracy: 83.33%
Results with 2 pip spread costs
Profit: $1,420 on 108 trades trading 1 standard lot per signal
Profit factor: 1.24
Percent accuracy: 65.74%
The scalper EA is incredibly sensitive to two assumptions: spread and slippage. I assume that anyone following this methodology trades at a reputable broker with good execution. The backtests assume that the combined cost of both spread and average slippage is 2 pips.
If your broker does not provide execution and spreads within that 2 pip window, then do not trade this strategy. I would not expect for you to walk away a winner.
Walk forward results without spread costs
Profit: $1,960 on 34 trades trading 1 standard lot per signal
Profit factor: 4.38
Percent accuracy: 88.24%
What is scalping?
Scalping refers to a short term trading style. Profits are very small and occur a large percentage of the time. When losses happen, they tend to be several times larger than a typical winner.
The high number of wins attracts traders of all stripes. The idea of consistently earning profits makes trading more fun and appealing. Traders with experience, which inevitably means traders that have suffered losses, also find the high percentage win rate appealing. It makes the emotional suffering far less difficult.
The emotional component that attracts traders to scalping strategies leads to illogical business decisions. Traders place the need to win frequently above the long term need to expect a profit.
Too many scalping expert advisors tap into the high winning percentage. Most fail to present a clear and obvious reason why it makes sense to scalp.
The EURUSD typically costs $2 to trade a mini lot. Many scalpers set narrow profit targets between 1-5 pips, which are worth $1-5.
The trader spends $2 to make $1-5. If this were a normal business, that would be the end of the game. You win. The game is only limited by the number of trades placed.
Trading, unlike other businesses, frequently results in losses. It’s very possible to build an expert advisor that could win trading for free but loses when costs enter the picture.
The best example is the difference in the scalper EA backtests for 2011. The first test showed a percent accuracy of 83% without including the spread. Adding the spread to the second backtest decreased the accuracy to 65%.

Trading costs make all the difference in scalping. Many scalping strategies live and die based on their trading costs.
The accuracy dropped because all trades had to subtract the spread cost from their simulated winnings. The number of trades that flipped from profit to loss because of a 2 pip spread shows how many trades profited by the narrowest of margins. The narrower the margin of profit, the more sensitive a strategy becomes to spread costs.
Do you think that I should have considered other ideas in the strategy? Suggest some ways to improve in the comments section below.
After-thoughts
This series eventually led to a profitable trading strategy. If you’d like to read through the journey, then I suggest reading the articles sequentially
The initial strategy idea
Selecting an appropriate time frame
A research plan
An annoying surprise in the initial backtests
An attempt at range trading
Range trading results
The moving average envelope scalper
Hi Shaun,
could you give me some reference to moving average envelopes, i don’t understand what exactly is 1% envelope. I would like to code this strategy and testing it by myself
Best.
Hey Vince,
A moving average envelope is a percentage of the moving average. Say that the SMA is currently 100 and you’re drawing a 1% envelope. You would draw an upper band 1% above the current SMA, which is 101. You would draw the lower band 1% below the SMA, which is 99.
Does that make sense?
Thank you Shaun,
yes 🙂
Hi Shaun,
Your returns can become stella with money management – if I get time this week, I will write out this strategy in Meta Trader and add my predictive money management and send you the returns.
cheers,
Andrew
I’m going to post the MT4 code today.
I’m really looking forward to your money management idea. It’s amazing what you can do with intelligent risk taking.
Likewise Andrew – will be interesting to see the difference in the results.
Hi Shaun,
Thanks for this. It backtested very well. I’m impressed. Thankyou for sharing this with your clients.
You’re welcome! Please let me know if you use it in live trading.
Hi Shaun,
Thanks for the code, saved me some hours of work writing the Metatrader code.
I did a quick analysis, I took 6 months of the EURUSD and AUDUSD from the first half of 2012. During my backtests the spread was hovering just around 2pips.
With my Money Management predictive modeller service I wrote, it returns 17 times more than the return from a fixed 0.1 lot size.
Shaun, send me your trade results and I will put it into my predictive money management modeller, so you can see what you would have returned.
My money management uses complex calculations such as kelly formulae, z-score, etc. However, the concept is easy to understand, If it predicts positive returns then it increases the lot size significantly, if predicts storm approaching or in a storm then reduces the lot size significantly. It does this over the last 7 trades.
cheers,
Andrew G
Very cool! I’m on my way to Kansas City to speak at a trader’s summit. I won’t be able to get this back to you until I return, which will be early next week.
Thanks for sharing your research.
Andrew
Are you planning on posting the undated EA with your money management improvements?
Jason
I’m pretty interested to see the impact on performance with Money Management; Im currently running this on demo with 10 pairs’, trying to work out lot sizes. Has anyone considered lot size in relation to both the pairs and the account size?
Hi Andrew,
do you have a white paper or blog post describing your predictive money management? I would like to read more about the concept.
Thanks!
Mike
Hi Shaun, Thanks for sharing your EURUSD Scalper EA. Do you use a stop loss or just wait for the bar to close above or below the envelope level?
Also have you tested it on any other currency pairs that have tight spreads? Or does it just work on EURUSD?
Many thanks
Simon
Hey Simon,
The strategy does not use a hard stop loss. Instead, there is always a point where the EA will exit the market at a profit or loss at the moving average envelope.
I expect that the EA would work on most other currency pairs. I’ve run the graphs that I originally created as part of the group trading strategy. Most currency pairs exhibit similar shapes to the EURUSD. The only pair where I wouldn’t expect it to work is the USDJPY.
HI Shaun !
Thanks for sharing your EA. But I can’t see it anywhere here, where can I download it from ?
Thanks
I also dont see it anyware.
HI Shaun,
Thanks for sharing. But I can’t see it anywhere here to download.
Where can I download it from?
Thanks.
Hi koke,
I took down the download section for the files. It was only available for a limited time.
Hi Shaun,
i know you took down the download section, i want to know if the rules you posted is enough to code the system, i’ll try to code it by myself.
Best.
Hi Vince,
Yes, it’s enough.
Hey Andrew, am I able to obtain a copy of your predictive MM modeller within the MT4 code at all?
Thanks
-Michael
Hi Shaun,
You made a fine EA. I’m currently trading with 0.01 lots per 100K, and I am running the EA on a $300 real account at: http://www.forexrazor.com/en-us/account.aspx?sid=14764
Cheers,
Steven
Awesome! Thank you for posting the live performance results.
Witam.
Czy kod do opisywanej w tym wątku EA jest gdzieś dostępny?
Pozdrawiam.
Hi harison,
I used Google Translate to understand the question. You can obtain a free copy by signing up for the mailing list near the top of the page.
hi Shaun,
I signed up but didn’t get the free copy of the Scalper EA.
Can u take a looksee?
Thnx – Buzz
Hi Buzz,
It can take up to an hour for the email to arrive. Please let me know if you’re still having trouble.
I did not see the code when I clicked on the link. Did I do something wrong? Is there a specific time frame that this EA works. Like from 5am est to 10 am or something like that?
Hi George,
Thanks for the comment. The EA runs 24-7. It’s not limited to certain times of day.
The code is emailed within an hour of completing the email registration.
Hi Shaun
I did some backtesting with the EA on MT4. I have my backtesting data setup so that I get 99% quality. The EA did not perform very well at all. If you would like to see the reports, let me know where I can send them to you. I left all the inputs at default. Maybe I’m doing something wrong. Thx Joe
Hi Joe,
You can email the reports to info@onestepremoved.com.
Hi Shaun
Sorry, for my hasty comment, don’t know what I was doing wrong, tested them today and the results are quite good. Tested 2008 to 2012 and only 1 losing year (2008), the rest winners. Have emailed you the reports.
cheers
Joe
Hi Shawn ….
I like your video and I am impressed with what I’ve learned about scalping. Thank you. I am interested in trying this strategy. However, I must ask, if I join your member list, can I receive a free copy of Scalper_EA?
God bless…..
JP
Hi JP,
Thanks for the comment. Yes, the Scalper EA is emailed after joining the mailing list.
can I test the EA Shaun
Yes. It’s automatically emailed when you subscribe to the free trading strategies mailing list.
Hi Shaun, as you wrote that you would like some input, maybe this can add something.
This reminds me of a range strategy that I have seen a few years back. It used a ema 200 as a trend, above only long and below only short. Within this trend it took trades based on counter price action for the rsi, oversold (for a long) and overbought (for a sell) using rsi. Exit it on the first bar that closes in profit, with an exit based on an atr with multiplier. But this strategy had one thing that worked well performance-wise, but is maybe not the best option regarding r:r. When price action kept going it opened trades for a max of 3 consecutive candles and had both an atr stop for either one of them and uses the take profit per candle closed on profit. It worked on longer time frames 1h/4h and up, never saw a test on lower time frames. Maybe you can add something like that and see if it does any good. It worked on most pairs, commodities, indices and stocks as long as the spreads were tight. Only thing was that in worst case scenario you would build up a position three times the average position and the estimated profit was not in relation to the pre-selected stop. You would exit on the first candle in profit (irrelevant what the profit would be) or exit at the atr stop.
I don’t know, it’s a little like your strategy and I know it worked back then, live and in back testing (slippage and spreads included).
Great suggestion. Remind of this in a few weeks. We’ll put this on the docket for strategies to review.
Thx Shaun, Your EA meet my fit, impresif & simple, I tested it work like champ, hope this EA don’t have expired. And may God Bless You.
whats the avg no. of trades per day.
Please read the post. The number of trades per year is covered in the main section.
Bro,
I want to know this ea usually open how many trades in a month? Cos from 1st of june 2013 till today i only have 1 trade! Pls confirm with me…thanks!
That’s normal. It can go six months between trades, then start trading 10 times a day. It only trades when the conditions are met.
After subscribing, how much it takes the EA to come to my mail, or what i do? I am subscribed and I can’t find the EA
You’ll receive the email within one hour. Please check your junk mail if you still haven’t received the email.
Hey There. I found your blog using msn. This is an extremely well written article.
I will be sure to bookmark it and come back to
read more of your useful info. Thanks for the post.
I’ll certainly comeback.
مرحباً استاذ شون كيف حالك
يارب تكون بخير
لا استطيع الكتابه بالانجليزيه واعلم انك جيد باللغه العربيه
قمت بالاشتراك وصلني ملف نوعه غريب اذا ممكن اكسبيرت يعمل على ميتاتريدر
حتى اقوم بتجربته
شكرا لمشاركتنا جهودك
شكر لشرح الموضوع و المشكلة التى صارت حضرتك. نوع الملف زيب. لازم عملية “انزيب” قبل ان تقوم بتثبيت الاكسبرت
unzip
Thank you Shaun
You’re welcome! I’m glad that you’re enjoying the site.
Hi , thank you for the share , but for an unknown reason , i didn’t received the EA in my mail. Is that normal ?? Thank you and happy new year to you and your family!!
ALex
Hey Alex,
Happy New Year to you, too! The EA can take up to an hour to arrive in your inbox. If it’s not there yet, try checking your junk mail.
hello Shaun. where is the EA ? can you give me..?
Hi Indra,
The EA is available to anyone who completes the free registration for the EA. The registration form is near the top of the page.
Hi Shaun,
Great article! It really shows that you understand what you are talking about!
I couldn’t find information on the different parameters that are available for users when attaching the EA to a chart:
I understand they are all pretty self-explanatory, however I would like to use a trailing stop but I am unsure what I should set TrailStart and TrailAmount to.
What range would you recommend for these particular settings?
How would this differ between 4 and 5 digit brokers? (eg. I have 5 digits, do I say 50 instead of 5?)
What exactly would say 5 mean – 5 pips?
I hope you can email me a response to ensure I receive it.
Thanks!
Hey Matthew,
Thanks for the comments. Trail Start moves your stop loss to breakeven whenever you trade is profitable by at least Trail Start pips. The stop loss then trails by Trail Amount pips for every additional Trail Amount pips of profit.
Example:
Trail Start = 20
Trail Amount = 5
The stop loss moves to breakeven whenever a trade is profitable 20 pips or more. Thereafter, the EA locks in each additional pips of profit.
When the profit is 20 pips, the stop moves to 0. When the profit is 25 pips, the stop moves to 5. When the profit is 30 pips, the stop moves to 10.
I don’ recommend using a stop loss. It’s only there for people that would like to use one.
The EA automatically adjusts to 5 digit brokers. You don’t need to alter any settings.
HI Shaun,
I live here in Australia. I have just found your site and I am very interested in the SCALPER EA. I have a HF-Scalper ,from BJF Trading[Canada]. But it went ok under Demo test and since , has not been in profit. Please advise if I can Down load your EA and try it. I have a ECN live account with IC Markets,Australia with very good latency. Kind Regards, Barry
Hi Barry,
Thanks for your comment. The scalper EA is a free give-away. You can sign up on this page and the EA will be mailed to you.
Dear Shaun Overton
can i get this ea
Yes – enter your email in the box near the top of the post.
CA I HAVE EA ?
Hi Luigino,
Of course. Just sign up for the email list on the page and it’ll be sent to you within an hour.
Hi Shaun,
I like the basic approach of this strategy. I think you’ve captured something very valuable by analyzing the kink in the slope of the SMA envelope.
I ran around 7 years of backtests for a few different instruments and routinely notice that the max.loss is almost always greater than the max win. Have you made any improvements on this strategy since its publication ? I have a couple of ideas to modify it to so that both the sharpe ratio and slippage can improve…
Would be very interested to make some modifications on this strategy with you if you are still upgrading this, and I’m very curious if this strategy has progressed further in 2014..
Best,
Deniz
Hi Deniz,
Thanks for your comments. You are correct that the max losses are always greater than the max wins. It’s something that goes hand in hand with trading mean reversion. I’m all ears if you’d like to suggest some filters.
All of my current research efforts are devoted to QB Pro, which is the strongest strategy in my stable.
Hello Shaun,
Thank you for the gift of the scalper EA. I will like to know what figure should I set as take profit, stop loss, trail start and trail amount?
Thank you.
Hi Isaiah,
It’s preset in the EA.
Hi shaun
Very very tnx for robot
Plz send me your email than I can to talking with you.
Hello Mr shaun
I didn’t know how to launch the envelope 1% in metatrader 4 because of the 1%
I am wondering if you can help me
Hi Moe,
Envelope is a default indicator in MT4. Just put it on the chart and set the deviation to 1%.
–Shaun
Hello dear sheun overton .I just appriciate to you for providing this scalper ea to us which is free . but dear sheun I downloaded this ea but there is no presets in ea zip file ? So please tell me which figures I should use for take profit and stop loss and trailing start and trailing amount ? I hope that you will give answer to me ? Thank you
Hi Saqib,
The EA’s defaults are the recommended settings. Simply apply it to a chart and you’re ready to trade.
–Shaun
Hello dear Shaun I wanna ask that will it take auto trailing stop loss or we should put values in the trail start 20 and amount 5 in the tail and amount ?please tell me ?
Hi Saqib,
I don’t recommend using a trailing stop on the EA. It’s better to leave the Take Profit settings as is.
–Shaun
Hello Dear Shaun , I attached the EA scalper with EURO/USD , GBP/USD on M1 by creating its presets but it does not take any order? In the strategy test its report is good which I created presets but in real and in demo account it does not take any order .My broker is instaforex with spread 3 and slippage 3 so can you tell me please how it will take the orders?
Please read the instructions on this page. I have some comments.
– It’s supposed to go on an M5 chart
– The entry rules are explained on this page. Were the entry conditions met to place a trade?
– The article explicitly talks about the maximum realistic spread that you can use… 3 pips is far too wide for scalping.
hello , then there is no broker which have a 2 pip spread ?if you know about any broker which have a 2 pip spread so please tell me ?
I do my live trading through these guys.
Hello.
I would like to know for an account of USD50 how many lots should be used to trade this EA?
Spread is no problem it can be less then 2 or the broker offers fixed spread of EURUSD 2 pips.
Which is better to use for the EA if you can tell me also.
Thank you for this EA.
1 microlot at the most. You realistically should be trading 1 microlot for every $200 in the account.
Hola, Shaun
Buenas noches
Podrias por favor enviarme el TPL?
Gracias
Por favor registrarse para el email newsletter y va a reciber el EA por email.
Tengo una duda, cuanto de % tiene efectividad Tu EA, y tu robot tiene fecha de vencimiento ???
The EA does not expire.
Hello how Van i Get your Scalping Expert Shaun?
Sign up inside the post. Just type in your email address and join the mailing list.
Is there any long term chart for trading this EA?
Ron
Not that you would get signals on with any appreciable frequency.