Dynamic Trailing Stop Loss and Profit Target with Machine Learning

Crypto-ML has been steadily releasing risk management features for its cryptocurrency trading signals. These features are controls designed to (a) help avoid excessive losses and (b) help protect profitable positions. Trading systems that are effective in the long run emphasize risk management principles.

This post will cover two of Crypto-ML’s risk management features:

  • Dynamic trailing stop losses
  • Dynamic profit targets

Dynamic Trailing Stop Losses

Trailing stops are used to avoid loss and protect profit. Trailing stop losses are initially set at a percentage below the trade’s open price. Then, if price moves up, the trailing stop will also move up. However, if price moves back down, the trailing stop loss stays put; it does not move back in the other direction.

Release 3.0 of the Crypto-ML trading platform introduced intelligent stop losses and trailing stops. The values for these are determined at the time the trade is opened and are set by our machine learning optimization algorithms.

With Release 5.2, the trailing stop losses are now dynamic. As a trade moves up, the trailing stop loss can tighten in order to better protect profit.

The point at which the trailing stop loss tightens and by how much is determined by the machine learning optimization algorithms.

TimeBitcoin PriceTrailing StopTrailing Stop PriceComment
1$8,900   
2$9,000-3.50%$8,685Trade opened.
3$9,240-3.50%$8,917 
4$9,230-3.50%$8,917 
5$9,300-3.50%$8,975 
6$9,600-2.00%$9,408Trailing stop adjusts.
7$9,650-2.00%$9,457 
8$9,400-2.00%$9,457Stop for 5% gain
9$9,100   
10$9,250   

Dynamic Profit Targets

In addition to the dynamic trailing stops, Crypto-ML Release 5.2 adds dynamic profit targets. Profit targets close out trades when the trade’s goal is achieved.

When professional traders plan a trade, they typically determine:

  • Entry point
  • Exit if wrong (stop loss)
  • Exit if right (profit target)

By mapping out the entire trade, you can better identify the risk and reward.

In addition, this helps avoid staying in a trade too long. Staying in a profitable trade adds unnecessary risk that can result in unrealized gains turning into realized losses.

In terms of Crypto-ML’s mechanism, a trade is opened when the neural network generates a price prediction that exceeds a predetermined “buy” threshold. The output of our neural networks is the prediction of where price will be 24 hours from now.

This prediction also determines the trade’s goal.

Crypto-ML Profit Targets (web)

As an example, our optimizers may have determined any predicted gain of 2.4% or more should result in an open. If the neural network generates a 2.51% price gain prediction, then the trade opens (since it exceeded 2.4%). It also establishes the goals for the trade. Price is predicted to go up by 2.51% in the next 24 hours, so 2.51% is our profit target.

If the trade achieves a 2.51% gain, then the trade will close.

However, the profit target is also dynamic. To account for bull runs, the profit target can change as the trade evolves. While the trade is open, the neural networks continue to churn out price predictions. If these predictions move higher, then the profit target will also move higher.

In our example, the trade was opened based on a 2.51% prediction. Within the next few hours, the prediction could increase to 4.87%. If this happens, the profit target will be upgraded to 4.87%. This allows the trade to run.

Full Set of Trade Closure Features

The dynamic trailing stop and dynamic profit target features are two ways in which a trade can close.

Additionally, trades may be closed based on the neural network predictions. Just as the optimizer sets thresholds to open trades, it also sets thresholds to close trades.

As an example, a trade may be open on a 2.51% prediction. However, over the next few hours, the predictions may begin to drop. The neural network then issues a -1.87% prediction. The optimizers have determined any prediction below -1.6 should result in a close. Since -18.7 is less than -1.6, the trade closes.

Last, based on these 5.20 changes, trailing stops eliminate the need for hard stop losses. Previously, Crypto-ML had both stop losses and trailing stop losses. The stop losses were set at a hard value below the trade. The trailing stop loss was looser and would begin moving up once the position became profitable. However, thanks to the dynamic capabilities, the trailing stop acts effectively as both the initial stop and the ongoing stop mechanism.

Altogether, trades can be closed in one of three ways:

  1. Price falls below the trailing stop loss value
  2. Price rises above the profit target value
  3. The neural network predicts a sufficiently large price drop

Real-Time Market Monitoring

Crypto-ML’s neural network runs happen in steady intervals. Given the swing trade nature of the platform and the depth of processing, it does not make sense to run in real-time.

However, there are many times the market moves quickly and we want to react outside of these standard intervals.

In order to best handle risk-management features, Crypto-ML has a second set of jobs running to monitor the markets in real-time.

If an exceptional price movement occurs, a trailing stop is hit, or a profit target is hit, then this monitoring feature will trigger a full neural network run. This will gather all of the data needed to make an effective decision and close the trade on the spot.

Machine Learning’s Role

Crypto-ML’s design principle is to use machine learning to:

  • Determine if a particular tool (such as a profit target) is useful.
  • If the tool is useful, determine the parameters for it.

As such, there isn’t a single parameter within our solution that is determined by humans.

Crypto-ML Machine Learning Process Flow - 2020 06 Updated

For trailing stop losses, machine learning answers these questions:

  • Where should the trailing stop initially be set? Optimizer
  • When should the trailing stop be tightened? Optimizer
  • When tightened, by how much? Optimizer
  • As market conditions change, when should these values change? Optimizer

For profit targets, machine learning answers these questions:

  • Where should the initial target be set? Neural Network
  • When should we increase the target? Neural Network
  • What should the revised target be set to? Neural Network

If you’re interested in learning more about our system:

We have yet to do a deep dive into the optimizer algorithms, but if you want to research on your own, we currently use a blackbox optimization method, NOMAD (Nonlinear Optimization by Mesh Adaptive Direct Search), with Python. However, many optimization options are available and we regularly utilize different solutions. For additional reading:

What Crypto-ML Customers Can Expect

Note: Crypto-ML has discontinued the auto trade service.

We have since transitioned to an investment-focused platform, leveraging machine learning and big data insights. You can learn more about out free or paid memberships to get started today.

Questions?

Let us know in the Comments section below!

About Crypto-ML

Whether you want to own 1, 10, or hundreds of bitcoins, we strive to help you realize your goal faster. Learn more and join for free.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Newsletter

Join 7k+ working professionals to "The Five-Year Plan". Every Saturday morning, you'll receive one actionable tip to create life-changing wealth in crypto.

Your Saturdays Just Got More Powerful!

Every Saturday morning, you'll receive one actionable tip to create life-changing wealth in crypto.