MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / MaxPositionSizeEditor

Function MaxPositionSizeEditor

ui/src/components/guards.tsx:264–281  ·  view source on GitHub ↗
({ options, onChange }: EditorProps)

Source from the content-addressed store, hash-verified

262}
263
264function 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
283function MaxLeverageEditor({ options, onChange }: EditorProps) {
284 const lev = Number(options.maxLeverage ?? 10)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected