({ options, onChange }: EditorProps)
| 262 | } |
| 263 | |
| 264 | function MaxPositionSizeEditor({ options, onChange }: EditorProps) { |
| 265 | const pct = Number(options.maxPercentOfEquity ?? 25) |
| 266 | return ( |
| 267 | <Field label="Max % of Equity per Position"> |
| 268 | <input |
| 269 | className={inputClass} |
| 270 | type="number" |
| 271 | min={1} |
| 272 | max={100} |
| 273 | value={pct} |
| 274 | onChange={(e) => onChange({ ...options, maxPercentOfEquity: Number(e.target.value) })} |
| 275 | /> |
| 276 | <p className="text-[10px] text-text-muted/60 mt-1"> |
| 277 | Rejects orders where estimated position value exceeds this % of account equity. |
| 278 | </p> |
| 279 | </Field> |
| 280 | ) |
| 281 | } |
| 282 | |
| 283 | function MaxLeverageEditor({ options, onChange }: EditorProps) { |
| 284 | const lev = Number(options.maxLeverage ?? 10) |
nothing calls this directly
no outgoing calls
no test coverage detected