Gesundheit

Customizable trailing Stop For Manual Entries

Gesundheit 업데이트됨   
Here's how to create a trailing stop with a manual buy order, on an exchange that does not support native trailing stops. Code can easily be copy+pasted into your normal algos.

To set the entry price for your manual trade, specify the bar time when the trade was made. Note that the time you specify needs to correspond to an opening time on your chart--if it's a 3 hour chart, 6 pm or 9 pm will work, but 8 PM will not. It's not as bad as it sounds though, read on :)

Per usual I keep multiple options open.

Special features in this script:
  • Change time frame for trailing
  • Specify trailing parameter (high, close, hlc3, etc.)
  • Change time frame for stop loss trigger (use a shorter time frame for earlier exits!)
  • Specify trigger parameter (close, low, hlc3, etc.)

Remember that annoying issue where you might not be able to precisely specify entry price, because you want to use 3 hour closing prices for your trailing stop but you bought in at 7:41 pm? Add this indicator to a 1 minute chart and set your start time to 19:41, then set the trailing time frame to 3 hours!

Next stop is v2, where we take profits along the way before stop loss gets triggered.
릴리즈 노트:
Disabled plotting of variables outside of the trading period, so the script does not mess up chart scaling.

Attempted to add trailing stop capability for short trades, but for some reason it's not working. Anybody have a clue?
릴리즈 노트:
Trailing stop now works for shorts :)
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?