This script demonstrate how to make a Training Stop Loss to "ride the wave". In comparison to classic Stop Loss this strategy follows the price upwards (for long positions) and when price drops by a fixed percentage then you exit your position.
릴리즈 노트
Minor typos
릴리즈 노트
Add the ability to disable trailing for demonstration reasons
Close open orders on trend reversal
Add sell labels on cross-under
릴리즈 노트
Fix a bug that made Stop Loss to not trigger appropriately when it was reached at the very first candle end enable trailing was un-checked
릴리즈 노트
Refactor stopValue calculation to be more readable
릴리즈 노트
Fix longIsActive logic
릴리즈 노트
Check if time is within backtest period in order to set the price to prevent unnecessary calculations and drawing outside the area of interest
Replace deprecated trasp argument with color.new
릴리즈 노트
Set calc on every tick to false by default, as fgo943 suggested
릴리즈 노트
Minor Update the chart for a better overview and understanding of the trailing stop loss
릴리즈 노트
Fix a bug that were causing stop loss to be calculated wrong when there was new entry back to back with the end of the previous one
Use strategy.percent_of_equity
릴리즈 노트
Draw lines with width 1
릴리즈 노트
Update to pinescript V5
Stop Loss step is now 0.05
릴리즈 노트
Let's face it a Green-Red color model is more intuitive!
릴리즈 노트
Happy New Year!
Many code refactorings and optimizations to better use this script as a template and plug your own strategy at ease
릴리즈 노트
Bug fix: (rare/minor) Remove 'strategy.position_size == 0' condition in stop loss calculation that made the very first stop loss price target to be calculated based on previous 'strategy.position_avg_price' instead of 'close' if the previous position closed exactly one bar before!
릴리즈 노트
(minor) refactoring
릴리즈 노트
Use time_filters library
릴리즈 노트
Minor revision update
릴리즈 노트
Replace deprecated "when=" with if statements in strategy calls
릴리즈 노트
Change fastMA default color to yellow
릴리즈 노트
Increase max labels to 300
Minor refactoring
릴리즈 노트
Update time_filters library
릴리즈 노트
Some minor label/color changes
릴리즈 노트
small refactoring
릴리즈 노트
Update time_filters library version
릴리즈 노트
Update time_filters library version
릴리즈 노트
Use the 'chrono_utils' library for the date-time window filter
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.