PROTECTED SOURCE SCRIPT

TS Calculator

What is Trailing Stop?

A trailing stop is a type of stop-loss order that adjusts itself as the price of an asset moves in a favorable direction. It’s designed to lock in profits or limit losses by following the asset’s price movement. Here’s how it works:

How a Trailing Stop Works
  1. Initial Setup: You set a trailing stop at a certain percentage or dollar amount below (for long trades) or above (for short trades) the current market price.

  2. Price Movement: As the price moves in your favor, the trailing stop moves with it, maintaining the set distance.

  3. Locking in Profits: If the price reverses direction by the set amount, the trailing stop triggers a market order to sell (for long trades) or buy (for short trades), locking in your profits or limiting your losses.


Example
Long Trade: If you buy a stock at $100 and set a trailing stop at 10%, the stop-loss order will initially be at $90. If the stock price rises to $120, the trailing stop moves up to $108 (10% below $120). If the price then drops to $108, the trailing stop triggers a sell order.

Short Trade: If you short a stock at $100 and set a trailing stop at 10%, the stop-loss order will initially be at $110. If the stock price falls to $80, the trailing stop moves down to $88 (10% above $80). If the price then rises to $88, the trailing stop triggers a buy order.



Benefits
  • Automated Risk Management: It helps manage risk without the need to constantly monitor the market.
  • Profit Protection: It locks in profits as the price moves in your favor.
  • Flexibility: It adjusts dynamically with the market price, unlike a fixed stop-loss order.


What this script does ?
This script plots the Trailing Stop from the point of entry to current date, until it hits the trailing stop. Some of the market did not give the trailing stop values exactly so this script may give you a wise view of that.

Variables
  • Date : Date with YYYY-MM-DD format
  • Time : Time with HH:MM:SS format
  • Entry Price : Activation Price of TS order
  • Bounceback Ratio : Ratio for TS
  • Order Type : Position of order as Long/Short


There is an also a table implemented which shows
  • Entry
  • Ratio
  • Position
  • Current Stop


For possible updates feel free to contact me via DM.
longshorttrailingtrailingstoptrailingstoplosstrendanalyisisTrend Analysis

Script protegido

Este script é publicado como de código fechado e você pode usá-lo livremente. Você pode favoritá-lo para utilizá-lo em um gráfico. Você não pode visualizar ou modificar seu código fonte.

Quer usar esse script no gráfico?


Show your piety to your god. World needs your humanity.
Também em:

Aviso legal