OPEN-SOURCE SCRIPT

2% Stop

This indicator is simply based on the 2% rule, you must insert the entry point (the price at what you bought) by clicking the gear on the top left.
If you see the chart different is becouse the default entry is set to 1 and but it fixes if you set the proper entry price.
a little bit about the 2% rule :
Following the 2% Rule will keep any loss in your account to a rela-
tively small, livable size.

The 2% Rule prohibits you from risking more than 2% of your account
equity on any single trade.
This Rule does
not limit your position size—it only limits your risk.
Of course, if you are planning to hold your position down to zero,
then its maximum size would have to be capped at 2%. On the
other hand, if you do a much more sensible thing and use a stop, your
risk per share will decrease, and your permitted size will increase.
The distance from your entry price to the stop level defines your
maximum dollar risk per coin.
The 2% Rule defines your maximum risk for the entire position.
Knowing the risk per share and the total permitted risk makes it
easy to calculate the maximum number of coins /shares you may trade.
Credit about this idea goes to Dr Elder Alexander.
2percentstopstopstoplossTrend Analysis

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal