Basics
Long Position
A position that profits when price goes up. You buy first, aiming to sell later at a higher price.
Going long means buying an asset in the expectation that its price will rise. The profit is the difference between your exit price and your entry price, times the quantity:
PnL = (exit price − entry price) × quantity
Buy 0.5 BTC at $60,000, sell at $64,000, and you make (64,000 − 60,000) × 0.5 = $2,000 before fees.
Risk profile
A spot long can at worst go to zero, so the most you can lose is what you paid. Leverage changes that arithmetic: a 10× levered long is wiped out by roughly a 10% move against you.
In strategy code
In AlphaProve strategies, a long entry is expressed as
Signal(direction='LONG', ...). The engine opens the position at the next
bar's open price and tracks its PnL until something closes
it: a stop-loss, a
take-profit, an opposite signal, or a time-based
exit.
On AlphaProve
Holding several longs at once is governed at the portfolio level, not
only per trade: max_open_positions caps how many run concurrently and
max_concentration_pct limits how much equity a single symbol can
absorb, so a basket of correlated longs can't quietly turn into one
oversized bet. While a backtest runs, the live SSE stream reports each
long as it opens and marks its unrealized PnL tick by tick, ending in
the run summary rather than only showing a final number.