Python for traders, tested by an engine that tells you if the edge is real.
Forge Developers is the manual, the reference and the code editor for Forge, Oathra's strategy tester. Indicators draw here. Strategies are tested in Forge on oathra.app.
A free Oathra account is enough to draw an indicator. A first test in Forge also needs price history, storage and credits.
rsi_cross.pypython
import forge as fg
from forge import param, ta
FORGE_API = 1
class RsiCross(fg.Strategy):
bars = fg.bars.Time("H1")
direction = "long"
period = param.Int(14, min=2, max=50, group="RSI")
buy_level = param.Int(30, min=10, max=45, step=5, group="RSI")
exit_level = param.Int(60, min=50, max=80, step=5, group="RSI")
def compute(self, d) -> fg.Signals:
rsi = ta.rsi(d.close, self.period)
return fg.Signals(
long_entry=ta.crossover(rsi, self.buy_level),
long_exit=rsi > self.exit_level,
)I come from
MetaTrader 5
What carries over from MQL5, what is different in Forge, and the pages to read first.
TradingView
What carries over from Pine, what is different in Forge, and the pages to read first.
QuantConnect
What carries over from LEAN, what is different in Forge, and the pages to read first.
Plain Python
What carries over from plain Python, what is different in Forge, and the pages to read first.
New to code
The five Python ideas a Forge file uses, each with a short example, and the first guide to follow.