Customizable trailing Stop For Manual Entries

Dec 18, 2017

Static chart image
Signals
Trailing-Stop

The Customizable Trailing Stop For Manual Entries indicator provides a flexible stop-loss management system for manual trades, allowing users to track entries and automate exit triggers based on percentage-based trailing logic across different timeframes.

Usage

The Usage section describes how the script can be used to manage open positions on platforms or exchanges that do not natively support trailing stop-loss orders. To initialize the tool, the user must input the exact timestamp (Year, Month, Day, Hour, and Minute) of their manual entry. Once configured, the script calculates a dynamic stop level that follows price action at a specified percentage distance.

Timeframe Synchronization

A key feature of this tool is its ability to decouple the trailing logic from the chart timeframe. For example, a user can monitor a trade on a 1-minute chart to ensure the entry timestamp is precise, while setting the trailing stop calculation to use 4-hour or Daily price data. This prevents premature exits caused by minor intraday volatility while maintaining a granular view of the price action.

Trigger and Trailing Parameters

The script allows users to define which price source triggers the stop (e.g., Close, Low, or High) and which source is used to calculate the trailing peak. This is particularly useful for traders who want the trailing stop to move based on Highs (for long positions) but only want the exit to trigger if the Close price breaks the stop level.

Details

The script operates by identifying the "Best Price" (the highest point reached for longs or lowest for shorts) since the specified start time. The trailing stop is then calculated by applying the user-defined percentage offset to this peak.

The execution logic utilizes request.security to fetch data from different timeframes if the "Use current chart resolution" options are disabled. This allows the tool to reference higher-timeframe trends for stop placement while executing the trigger logic on the current chart's price action. The indicator also includes built-in alert functionality that triggers once the price source crosses the calculated trailing level.

Settings

Core Settings

  • 1=Long, 2=Short: Determines the direction of the trade and the orientation of the trailing stop.
  • Start Year/Month/Day/Hour/Minute: Specifies the exact bar time when the manual trade was executed to begin calculations.
  • Trail Percent: The percentage distance maintained between the peak price and the stop-loss level.

Trailing Settings

  • Trailing Parameter: The price source (High, Close, etc.) used to determine the peak of the move.
  • Use current chart resolution for trailing stop?: When enabled, uses the timeframe of the current chart. When disabled, the custom timeframe below is used.
  • Use different timeframe for trailing?: Specifies the timeframe for peak price calculations (e.g., '240' for 4 hours).

Trigger Settings

  • Trigger for stoploss: The price source (Close, Low, etc.) that must cross the trailing price to trigger an exit.
  • Use current chart resolution for stop trigger?: Determines if the trigger logic should be evaluated on the current chart timeframe.
  • Use different timeframe for stop trigger?: Specifies a custom timeframe to evaluate the exit condition.

FAQ

How do I set the entry time if it doesn't align with my current chart? You should switch to a lower timeframe (like the 1-minute chart) to set the "Start Minute" and "Start Hour" precisely. The trailing logic can still be set to a higher timeframe using the "Use different timeframe" settings.

Why does the indicator disappear after a certain point? The indicator is designed to stop plotting once the stop-loss condition has been met (the trigger price crosses the trailing price). This signifies the trade is closed.

How can I access the Customizable Trailing Stop For Manual Entries? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.