Skip to content
Open RaamTrade

RC2_PARAM_TITLE

Param '<name>' title must be a string literal or a dict of language → text, e.g. title={"en": "Ratio", "he": "יחס"}.

What it means

title= gives a setting the words a member reads on the run form instead of its code name. It takes one text, or one text per language the platform speaks (en, he). Anything else is refused, so a misspelled language never becomes a silent third one and an empty title never becomes a blank row.

Why it happens

A language the platform does not speak:

class FrenchTitle(Strategy):
period = Param(20, min=2, max=200, title={"fr": "Période"})
trade = Symbol()
sizing = FixedCapital()
def execute(self):
sma = SMA(self.period, on=self.trade)
if sma.value > 0 and self.trade.is_flat:
self.buy(self.trade)

A title that is not text, or is empty:

class EmptyTitle(Strategy):
period = Param(20, min=2, max=200, title="")
trade = Symbol()
sizing = FixedCapital()
def execute(self):
sma = SMA(self.period, on=self.trade)
if sma.value > 0 and self.trade.is_flat:
self.buy(self.trade)

It is also raised on an indicator’s Param: the indicator settings do not show titles yet, so a title there is refused rather than silently dropped.

How to fix it

Write the words in quotes, one text or one per platform language:

class TitledPeriod(Strategy):
period = Param(20, min=2, max=200, title={"en": "Average period", "he": "תקופת הממוצע"})
trade = Symbol()
sizing = FixedCapital()
def execute(self):
sma = SMA(self.period, on=self.trade)
if sma.value > 0 and self.trade.is_flat:
self.buy(self.trade)