Simulate a position on past prices
etoro_simulate_positionWhat would have happened if a position had been opened at the start of a window and followed the candles: a long (buy) or short (sellShort) of amountUsd with a leverage, an optional stop loss and take profit, held until one of them (or the…
Instructions
What would have happened if a position had been opened at the start of a window and followed the candles: a long (buy) or short (sellShort) of amountUsd with a leverage, an optional stop loss and take profit, held until one of them (or the margin) is hit, or until the end of the window. Returns the entry and exit prices and times, why it ended, the result in USD and as a percentage of the amount, and the worst and best moments in between. Uses eToro's historical candles (bid prices; no spread, fees, overnight costs or slippage). It places nothing and prepares nothing. A simulation of the rule you gave on past prices, not a prediction, a recommendation or financial advice. Nothing was sent to eToro and nothing was prepared.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the window (exclusive). Default: now. | |
| from | Yes | Start of the window, ISO 8601 with timezone, e.g. 2025-01-01T00:00:00Z. | |
| side | Yes | ||
| symbol | No | Exact ticker, e.g. 'AAPL'. Provide symbol or instrumentId. | |
| interval | No | Candle size. Daily is enough for most questions; smaller candles find stops and targets more precisely. | 1d |
| leverage | No | ||
| amountUsd | Yes | Money put into the position. | |
| instrumentId | No | ||
| stopLossRate | No | Stop loss as a price (not a percentage): below the entry for a buy, above it for a sellShort. | |
| takeProfitRate | No | Take profit as a price: above the entry for a buy, below it for a sellShort. |