Taking partial profits at different levels is one of the most effective ways to lock in gains and manage risk as a trade moves in your favor. On BitMEX, you can automate multiple take profits from a single TradingView alert setup using TradingView To Anywhere partial close commands.
The first step is to modify the TradingView strategy/indicator in a way that it generates an alert each time a take profit level is hit.
The second step is to use the partial close command in the alert message box.
Here is an example of 3 take profit levels and the command we would use for each alert.
-
First take profit:
CLOSE ETHUSDT Q=20%
-
Second take profit:
CLOSE ETHUSDT Q=30%
-
Final take profit:
CLOSE ETHUSDT
These commands reduce your open position in stages, locking in profits.
The last command closes the entire remaining open position.
We could also use Q as the amount of order size. Assuming a starting position of 1000 ETHUSDT;
-
First take profit:
CLOSE ETHUSDT Q=400
-
Second take profit:
CLOSE ETHUSDT Q=300
-
Final take profit:
CLOSE ETHUSDT
Ready to automate? Create your BitMEX webhook and set up alerts—no coding needed!