Moving Average Scalper with Fixed Take Profit

Eric Park
Coinrule
Published in
7 min readJul 14, 2023

Hi there, and welcome to Coinrule’s 13th Strategy of The Week video. This format, the format of this week’s video will be slightly different and there’ll be streamed live on Twitch. The recording of the live stream will be uploaded to YouTube afterward. So, if you’re watching the recording on YouTube, be sure to join our Discord community. So, you know when the next live stream is. Now this benefits us in both ways because it grants you the opportunity to ask any questions you may have on the strategy in real-time and allows me to answer them. So, it’s really best for both of us if you join us live. However, obviously, I know that’s not possible all the time due to work commitments, differences in time zones, and so on. Okay, so let’s get started.

This week’s strategy is a slight spin on one of our traditional templates: moving average scalper. As the name suggests, the strategy will play heavily on moving averages and use them to enter and exit trades. However, the spin really comes from the fact that this variation of the strategy will also include a fixed take profit condition as well. And the strategy will not require TradingView signals and is available as a template on Coinrule. Meaning that will be extremely easy to set up and start running. We do also have the associated script for the strategy available on TradingView. So, if you want to back test it, you’re able to do that. I’ll show you how to do that later. So a simple moving average is an Arithmetic Moving Average calculated by adding recent price changes and then dividing that figure by the number of time periods in the calculation average. So for example, one could add the closing price of a coin for a number of time periods and then divide that by the total number of the same periods. So for example, MA9 is the closing price of a coin for nine (9) periods divided by nine (9). Short-term averages like Moving Average 9, I just give the example of they respond more quickly to changes in the price of an underlying coin. Whereas long-term averages e.g., MA200, like this purple one here are slower to react. Typically, the further apart the disparity they are in like between the short and long term, the bigger the spread will be between them. Yeah, so this is slower with longer-term averages. For example, this one is slower to react. Buy signals are generated when fast-moving averages cross above slow-moving averages. And as you might expect, Sell signals are generated when fast-moving averages cross below slow-moving averages. So, you can see here, we’ve got a fast one crossing above a slow one just here. This is a Buy signal for us.

So, let’s discuss the entry condition to the strategy. To enter positions, the strategy looks for all of the following conditions to be met: MA9 crossing above MA50 just like this here. And this is our main Bullish signal. Remember that a fast-Moving Average crossing above a slow-Moving Average is a Buy signal and vice versa. We also require the MA50 to be lower than MA100. So, this orange line is under this blue line. And the MA100 is lower than MA200 which when the crossing occurred here was the case. I’ll show you a quick example of this on the chart as well. This is… you can see this is quite messy of many moving averages here. But this is just a graphic I showed you in closer detail. So, you can see the crossing occurs and then we ended up we go along after this when all the Buy conditions are met.

Okay, let’s also look at the exit conditions of the strategy as well. So, the exit positions, the strategy looks for one of two conditions to be met. And the first is of MA9 crosses above MA200. Just like this example here. You can see that once a crossover occurs, the position is closed just afterward. So, I think this position here, this trade here would have a net of about 5% profit approximately.

The second condition is if the price increases by 8% from entry. I’ll show this in the chart quickly because this is actually quite hard to see because of the numbers on the slideshow. So you can see here we go along, the price increases by 8%, and the position is closed.

Right, so now we’ve discussed the entry and exit conditions. Let’s look at the back-testing data. If you remember earlier, I told you the script is available in our TradingView Profile. So, this is it here Moving Average scalper with Fixed Take Profit. So, to back test this is really very simple. If you scroll down as well, you’ll see a description of the entry and exit conditions. This is just what we’ve been over. But it’s here for your reference. Also, if there are any questions pop them on the chat because I can get them down here. So yeah, these are the entry and exit conditions in the strategy, scroll down, and you’ll get the option to add it to your favorite indicators. So, if you do that, when it comes to the chart you want it to test on. So, let’s go to BTC, the US, and the one-hour timeframe. Come to indicators will now be in your favorites. And then just type in the name of the strategy. So, type in Moving Average Scalper and fixed a profit, and click it out of the chart. And you see you are provided with some back-testing data here.

Nice. So, as you’ll see, if you change the timeframes up here as well, the profit figure will change, I found that it works well on medium to long-term timeframes. So, one to four hours to a day. And you’ll also see that if you change the pairing up here, that the backtesting results are automatically updated. You see it doesn’t perform well on the theory on the two-hour. So obviously, we don’t want to run it on this three-hour also performs worse. Let’s try the daily, and you can see it performs as well.

So, once you have found, with some pairings and timeframes that you’re happy with, I think I’m going to run it on the one hour because this performed very well on Bitcoin, as we can see here, 52% net profit. And you’ll also see that quite a lot of the times that this is quite a low-risk strategy, in terms that it’s the percentage of trades that are profitable is usually quite high. It’s usually above 70 to 80%, which is yeah, it’s usually quite high. That’s quite high for a strategy.

Yeah, so if you’re happy with this, come to Coinrule. Click, and create a rule up here. And then type in the name of the strategy. Here we are Moving Average Scalper Fixed Take Profit, click it, and you have a description of the strategy, click Select. And wait for it to load. And you’ll see that it is added here. So, this is the 8% Take Profit condition that I was hinting at, you can also see that if you want to actually test this, obviously, you can change this to 5% or wherever you want really.

So if you’d like to change this to 5%, if you want if you wanted to backtest it with 5% instead of an 8% net profit, super easy, just come to the script here on the TradingView page, copy and paste it, come back to the chart, remove the old one, Pine editor, delete this, paste this. And then you can see the take profit here is 8%. So, you remember on the one hour, we saw there was 52% net profit. So why don’t we try with 5% add it to the chart and it seems net profit went down. So, I’m going to keep it 8% obviously because the profit was higher, but feel free to experiment with a range of different the range of different values for that and just to effectively find one… find a value that’s really optimized and is really effective really. So, I’m going to keep this 8%. I mentioned earlier that I’m going to also run on the one hour so I’m going to change all of this to one hour. Also, an advantage of this not using TradingView signals is that you can run this strategy using any coin scanner. So, this effectively means that rather than having this strategy just to operate on one specific coin pairing. You can effectively… have to use and take advantage of this any coin scanner in order to…

Happy trading with Coinrule💫

Watch the video on Youtube⬇️

Learn more about the strategies you can run automatically on Coinrule.

Get started today!

Trade safely

Follow us on Twitter: @CoinRuleHQ or Instagram: @CoinruleHQ

DISCLAIMER

I am not an analyst or investment advisor. Everything that I provide here site is purely for guidance, informational and educational purposes. All information contained in my post should be independently verified and confirmed. I can’t be found accountable for any loss or damage whatsoever caused in reliance upon such information. Please be aware of the risks involved with trading cryptocurrencies.

--

--