position_plan_on_chart
Calculate a risk-first long/short position and draw the entry, stop and first target directly on the live chart. The drawing retains quantity, notional, margin, costs, liquidation estimate, targets, warnings and an optional sandbox program id so later analysis reads the same plan the user sees. Changes the chart you are building; call chart_link when you are done so the person can open it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| side | Yes | ||
| stop | Yes | ||
| entry | Yes | ||
| equity | Yes | Account equity in quote currency. | |
| feeBps | No | Fee per side in basis points. Default 4. | |
| symbol | No | ||
| toTime | No | Optional end timestamp in seconds. | |
| targets | Yes | Take-profit prices and the percentage closed at each. Allocations should total 100. | |
| barsWide | No | Width when timestamps are omitted. Default 20 bars. | |
| fromTime | No | Optional start timestamp in seconds. | |
| leverage | No | Selected venue leverage. Default 1. | |
| timeframe | No | ||
| fundingRate | No | Funding per settlement as a fraction, e.g. 0.0001. | |
| riskPercent | Yes | Equity risked if the stop fills, in percent. | |
| holdingHours | No | Expected holding time for the funding estimate. | |
| fundingPerDay | No | Funding settlements per day. Default 3. | |
| strategyProgramId | No | Optional sandbox program linked to this plan. | |
| maintenanceMarginRate | No | Fraction used for approximate liquidation. Default 0.005. |