Converting Dollar Risk into Stop-Loss and Take-Profit Distances
Summary
This Pine Script example shows how to set a strategy’s stop loss and take profit as cash amounts in the symbol’s currency. It uses a moving-average crossover for illustrative long and short entries, then converts the configured money amounts into tick distances using the instrument’s point value, minimum tick, and current position size. The resulting distances are passed to the strategy’s exit function, and plotted around the average entry price for visual inspection.
The script is an educational example rather than a tested trading system. It gives no performance results, and its sizing conversion depends on instrument metadata and position size; users should check how those behave for their symbol and order-sizing method. The page’s comments also indicate that applying the script with percentage-based equity sizing may need adjustment.
Key ideas
- A cash-denominated risk amount can be converted into a price distance using point value, tick size, and absolute position size.
- The example applies the resulting distances to both stop-loss and take-profit exits.
- It plots the average entry price and corresponding exit levels to make them visible on a chart.
- The moving-average crossover supplies sample entries and is not presented as a validated strategy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.