OPEN-SOURCE SCRIPT

Alferow_pnl_up_long

By IntelTrading
Updated
This script allows you to determine the leverage required to enter one position based on the set entry price, the price of the expected take profit, stop loss and risk per transaction. It also allows you to schedule this transaction for 5 possible transactions, with different shoulders and a martingale coefficient for each subsequent gain at the same risk, allowing you to qualitatively improve the pnl of the transaction with price fluctuations after entering the transaction. The script is designed for long positions.
Release Notes
In the initial version, the liquidation price was calculated incorrectly
leveragemarginmartingaleVolatility
IntelTrading

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer