Two Take Profits and Two Stop Loss

This script is for research purposes only. I am not a financial advisor.

Entry Condition
This strategy is based on two take profit targets, two stop loss, and scaling out strategy. The entry rule is very simple. Whenever the EMA crossover WMA , the long trade is taken and vice versa.

Take Profit and Stop Loss
The first take profit is set at 20 pips above the long entry and the second take profit is set at 40 pips above the long entry. Meanwhile, the first stop loss is set at 20 pips below the long entry and the second stop loss is set at the long entry.

Money Management
When the first take profit is achieved, half of the position is closed and the first stop loss is moved to the entry-level. The rest of the position is open to achieve either second take profit or second stop loss.

There are three outcomes when using this strategy. Let's say you enter the trade with 200 lot size and you are risking 2% of your equity.
1. The first outcome is when the price hits stop loss, you lose the entire 2%.
2. The second outcome is when the price hits the first take profit and you close half of your position. Meaning that you have gained 1%. Then you let the trade running and eventually it hits the second stop loss. Remember your first stop loss has changed to the second stop loss when the first take profit is achieved. The total loss is 0% because the price is at your entry-level. You have gained the earlier 1% and then lost 0%. At this point, you are at 1% gained.
3. The third outcome is similar to the second out but instead of hitting the second stop loss, the trade is running to your favor and hits the second take profit.
Therefore, you gained 1% from the first take profit and you gained another 2% for the second take profit. Your total gained is 3%

The reason behind this strategy is to minimize risk. with normal strategy, you only have two outcomes which are either win or loss. With this strategy, you have three outcomes which win 3%, win 1%, or loss 2%.

This is my similar strategy but with single stop loss
Open-source Skript

Ganz im Sinne von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es verstehen und überprüfen können. Ein Hoch auf den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln. Sie können das Skript den Favoriten hinzufügen, um es auf dem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


Hey awesome script!
Hy.. nice work .
hello. ur idea is awesome. but instead of pips snippet(pip = input(20)*10*syminfo.mintick), if we want to use percentage,then what will be the snippet for it?
jeongcm223 cryptopreet
@cryptopreet, I want too
Hi! Great job!
Do you think it is technically possible to create 3 Take Profit levels and 3 Stop Loss levels. For example when we reach 2nd TP, Stop Loss moves to 1st TP level and when we reach 3rd TP, Stop Loss moves to 2nd TP level?
Nice work!
ahmad_naquib allanster
@allanster, thank you sifu :D
cryptopreet allanster
@allanster, hello. i tried to convert 41 line of script with---- target(percent) =>
strategy.position_avg_price * percent / 100 / syminfo.mintick
targetpercentage = target(input(2, title = "level %%")) ---so that instead of pips,script works on percentage but it doesnot plot TP & SL according to input and vary according to assets.can u help in this regard
jeongcm223 cryptopreet
have you solved this problem?