TanHef

Limit Order + ATR Stop-Loss [TANHEF]

TanHef Diupdate   
This indicator enables interactive placement of limit or stop-limit orders with a trailing ATR stop-loss and optional profit target (with alerts). Refer to the images below for further clarification.

Why use a trailing stop-loss?
A trailing stop-loss serves as an exit strategy when price moves against you, while also allowing you to adjust the exit point further into profit when price moves favorably. The ATR (Average True Range), a reliable measure of volatility, acts as an effective risk management tool, functioning as a trailing stop-loss.

Indicator Explanation
  • Initial indicator placement: Select Long Limit or Long-Stop Limit order.
  • Change Entry Type: Switch between Long and Short within settings.
  • Modify entry price: Drag circle, adjust in settings, or re-add indicator to chart.
  • Optional Profit Target: Use Risk/Reward ratio or specify price.
  • Entry anticipation: Estimated ATR stop-loss and profit target as blue circles (fluctuates with volatility changes).
  • Entry triggered: Actual ATR stop-loss and profit target plotted.
  • Exit conditions: Stop-loss or profit target hit, exit entry.
  • Update Frequency: Continuously, Bar Open, or Bar Open on entry then continuously.
  • ATR Overlap: no entry occurs if the ATR overlaps with price (stop-loss 'hit' already on entry bar)
  • Table: Displays input settings selected.
  • Show Only On Ticker: Ability to hide indicator on other tickers.


Long Limit

Long Stop-Limit

Short Limit

Short Stop-Limit


Alerts
1. 'Check' alerts to use within indicator settings (entry, trailing stop hit, profit target hit, and failed entry).
2. Select 'Create Alert'
3. Set the condition to 'Limit Order + ATR Stop-Loss''
4. Select create.

Additional details can be added to the alert message using these words in between Curly (Brace) Brackets:
  • {{trail}} = ATR trailing stop-loss (price)
  • {{target}} = Price target (price)
  • {{type}} = Long or Short stop-loss (word)
  • {{traildistance}} = Trailing Distance (%)
  • {{targetdistance}} = Target Distance (%)
  • {{starttime}} = Start time of position (day:hr:min)
  • {{maxdrawdown}} = max loss
  • {{maxprofit}} = max profit
  • {{update}} = stoploss update frequency
  • {{entrysource}} = entry as 1st bar source (yes/no)
  • {{triggerentry}} = Wick/Close Trigger entry input
  • {{triggerexit}} = Wick/Close Trigger exit input
  • {{triggertarget}} = Wick/Close Trigger target input
  • {{atrlength}} = ATR length input
  • {{atrmultiplier}} = ATR multiplier input
  • {{atrtype}} = ATR type input
  • {{ticker}} = Ticker of chart (word)
  • {{exchange}} = Exchange of chart (word)
  • {{description}} = Description of ticker (words)
  • {{close}} = Bar close (price)
  • {{open}} = Bar open (price)
  • {{high}} = Bar high (price)
  • {{low}} = Bar low (price)
  • {{hl2}} = Bar HL2 (price)
  • {{volume}} = Bar volume (value)
  • {{time}} = Current time (day:hr:min)
  • {{interval}} = Chart timeframe
  • {{newline}} = New line for text
Catatan Rilis:
Fixed label issue during active entry.
Catatan Rilis:
Removed unnecessary moving average inputs.
Catatan Rilis:
Alerts now function as intended.

Update Stop-Loss Frequency:
  • Always = update continuously. (Trailing)
  • Bar Open = update bar from prior close. (Trailing)
  • Entry Bar Open, then Always = update bar from prior close for entry bar, then every bar after updates continuously. (Trailing)
  • Never = static, not updated after entry open. (Non-Trailing)

www.tanhef.com/

Scripts and content from TanHef are solely for information and education. Past performance does not guarantee of future results.
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?