STRATEGIES
5
SIMULATION ENGINES
0
| SYM | STRAT | QTY | ENTRY | LAST | P&L | % | STOP | TGT | HELD |
|---|
Get every signal, every fill, instantly on your phone.
A test alert was just sent to your Telegram. Check your phone.
Unknown error
Two related but distinct concepts in tradingsmart.ai.
| Strategy | Simulation Engine | |
|---|---|---|
| Created via | + NEW STRATEGY | + NEW ENGINE (Engine Hub) |
| Source | Pasted Pine / Python / MQL / DSL | Studio: paste · git · visual builder |
| Execution | Evaluated each tick | Isolated Web Worker (parallel) |
| Live code edit | Re-create | ✓ Hot-reload |
| Version history | — | ✓ Snapshots + revert |
| Detail metrics | P&L · positions | + Sharpe · max DD · win rate · logs |
| Best for | Testing an idea fast | Running an idea seriously |
💡 You can promote a strategy to a simulation engine any time — open the strategy → ⚙ EDIT → Simulation Engine Studio.
onBar(bar, ctx) on every new candle of every symbol the simulation engine watches. Decide what to do, then call ctx.buy(), ctx.sell(), or do nothing.function onBar(bar, ctx) {
const fast = ema(ctx.closes, 9);
const slow = ema(ctx.closes, 21);
if (fast > slow) ctx.buy();
if (fast < slow) ctx.sell();
}
bar = current candle: { open, high, low, close, volume, time }ctx.closes / .highs / .lows / .opens / .volumes = arrays, oldest → newestctx.position = { qty, avgPrice } if open, null if flatctx.buy() · ctx.sell() — open / close at current price (uses INVESTMENT & LEVERAGE below)ctx.log("...") — write to engine logstate.x = ... — persists across bars for this simulation engineawait ctx.askLLM({ prompt }) — only if AI CO-PILOT is set (see below)onBar(bar, ctx) entry point. Catches errors here = saves a confused-bot rabbit hole later. Nothing is deployed by clicking VALIDATE.
ema, rsi, macd, crossover, …).
Output lands in CODE PASTE for review & validation before deploy.
Always read the output — LLM conversion is best-effort, not guaranteed.
// llm.* directives in source. Saving will pin them into bot.llm.
ctx.askLLM(...). Each role behaves differently — the system prompt is wired to match what you pick.
| SYMBOL | BARS | TRADES | WIN% | RETURN | P&L |
|---|
| SYM | SIDE | QTY | ENTRY | EXIT | P&L | EXIT REASON |
|---|
Not connected.
@tsai_terminal_alerts_bot. No bot token, no chat ID, no setup.
emailjs.com — create a service + template that takes
{{title}}, {{body}}, {{type}} variables.
Browser SMTP isn't possible; EmailJS is the standard browser-callable bridge.
Create an app on the developer portal, then copy your keys into the form below.
https://tradingsmart.ai/app/ so OAuth returns here automatically.
Enter the email you signed up with — we'll send a one-time reset link.
You're authenticated via the recovery link. Pick a new password to finish.