Skip to content
Open RaamTrade

RC2_NO_TRADE

Multiple Symbols declared; mark exactly one as trade=True to designate the trading symbol.

What it means

When a strategy declares two or more Symbol() slots, the transpiler can’t infer which one orders should target. You must mark exactly one with trade=True.

The other slots become data feeds — read-only OHLCV streams. You can read self.spy.close, but self.spy.is_flat and self.buy(self.spy) are errors.

How to fix it

Mark the slot you trade against:

class SPYFiltered(Strategy):
trade = Symbol(session=USEquityDaily, trade=True) # ✅ explicit trading slot
spy = Symbol(ticker="SPY") # data feed
sizing = FixedCapital()
def execute(self):
spy_sma = SMA(50, on=self.spy)
if self.spy.close > spy_sma.value and self.trade.is_flat:
self.buy(self.trade)

Single-symbol shortcut

In single-symbol strategies the marker is optional — the lone Symbol is implicitly the trading symbol:

class Simple(Strategy):
trade = Symbol() # ✅ no trade=True needed
sizing = FixedCapital()
def execute(self):
if self.trade.is_flat:
self.buy(self.trade)