📄️ Basic Long Position
Complete example of opening a long position with stop loss and take profit.
📄️ Basic Short Position
Complete example of opening a short position.
📄️ Partial Position Close
Examples of scaling out of positions. close_ratio is a fraction of the trade's original filled size, capped at what is still open. See Partial close for the full rules.
📄️ Update Orders
Examples of changing the stop-loss and take-profit after a position is open. MOVESTOPLOSS replaces both protective orders with the prices in the signal, so always send every level you want to keep.
📄️ Trailing Stop Examples
Examples using trailing stop functionality. The trailing stop replaces the take-profit order and is activated at takeprofitprice, so every example sets one. Trailing stops are not placed for paper bots.
📄️ Safety Check Examples
Examples of position validation and safety checks.
📄️ Chase Order Examples
Examples using chase orders to improve fill rates.
📄️ TradingView Integration
How to send TradingView alerts to an OptAlgo bot.