← Back to Insights

Greed is Good (If Automated): The Trailing Take Profit Strategy

2025-12-12

The old trading adage says: "You never go broke taking a profit."

This is a lie. You absolutely can go broke taking profits—if you take them too early.

If your losers are average sized, but you cut your winners short out of fear, your Risk/Reward ratio collapses. You need that one "home run" trade to pay for five small losses. But human psychology makes this impossible.

When a trade goes green, the Disposal Effect kicks in. We fear losing what we have gained, so we cash out at +5%. Then we watch in horror as the asset pumps another 40% without us.

The Problem: Fixed Targets

The problem is setting a "Fixed Take Profit." You buy Bitcoin at $90k. You set TP at $95k. Bitcoin hits $95k, you sell. Bitcoin goes to $105k.

You were "right," but you failed to maximize the opportunity. You capped your upside. In a bull market, capping your upside is a crime against your portfolio.

The Automaton: Trailing Take Profit (TTP)

We solve this with 3Commas's most valuable feature: Trailing Take Profit.

TTP does not sell when the target is hit. It activates a "Chase Mode."

  • Scenario: You set TTP at +5% with a deviation of -1%.
  • Action: When price hits +5%, the bot does not sell. It arms a trailing stop 1% below the current price.
  • Result:
    • If price goes to +10%, the stop moves up to +9%.
    • If price goes to +20%, the stop moves up to +19%.
    • The bot only sells when the price finally reverses by 1%.

You do not need to know where the top is. The bot will find it for you—after the fact.

The Visualization: Pine Script v6

While 3Commas handles the execution, we can use Pine Script to visualize how a trailing stop would have performed on past data to calibrate our settings.

//@version=6
indicator("Codon: Trailing Stop Visualizer", overlay=true)

// --- Settings ---
float trailPercent = input.float(1.0, "Trailing Deviation (%)") / 100

// --- Logic ---
// We simulate a long position that is always open to see the 'floor'
var float trailPrice = 0.0
var float highSinceEntry = 0.0

// Update the highest price seen
highSinceEntry := math.max(high, highSinceEntry[1])

// Calculate where the trailing stop would be
float theoreticalStop = highSinceEntry * (1 - trailPercent)

// Logic: The stop can only move UP, never down
trailPrice := math.max(theoreticalStop, trailPrice[1])

// --- Visualization ---
plot(trailPrice, color=color.orange, style=plot.style_step, linewidth=2, title="Trailing Floor")

// Logic check: Did price hit the floor?
bool stoppedOut = low < trailPrice
// (In a real strategy, you would reset highSinceEntry here)

The Automation Layer

This is standard protocol for all our Trend Following bots on 3Commas:

  1. Entry: Triggered by Pine Script (e.g., SuperTrend).
  2. Take Profit: Set to a trigger level (e.g., +2%).
  3. Trailing Feature: ON. Deviation: 0.5% - 2% (depending on asset volatility).

By using TTP, you transform from a fearful operator who snatches at pennies into a patient investor who catches whales.

You will never sell the exact top. But you will capture the "meat" of the move. And that is where the wealth is made.

(Check the footer for the 3Commas tools to enable TTP)