Skip to main content

stage 1: setting up algos

add your first algo to TradingView, backtest it, and load a template

Written by Brad

summary: stage 1 of 4. get access to the algos, add the IB algo to your TradingView chart, learn what it shows you, run your first backtest, and load an algo template for your ticker. no code, no broker and no money on the line yet.

new here? the 4 stages, and what you need before you start, are in edgeful algos: start here.

what you'll do in this stage

this matches the set up your algo column of the start here checklist in edgeful (algos → start here). 5 steps:

  1. get access to the algos in TradingView

  2. add the IB algo to your chart

  3. learn what the algo is showing you

  4. run your first backtest

  5. load an algo template

you don't write any code at any point. the algos are ready-made TradingView strategies. the only thing you type is your TradingView username.

step 1: get access to the algos

the algos are invite-only TradingView scripts, so edgeful has to grant your TradingView account access first.

  1. in edgeful, open algos in the left sidebar and click algo access (under access).

  2. enter your TradingView username, not your display name or email. it's the name in your profile URL: tradingview.com/u/your-username.

  3. click update.

not showing up? check the username against your profile URL, make sure you're signed in to the same TradingView account you entered, then close every TradingView tab and window (don't just refresh) and reopen it. access is usually immediate. still missing? → TradingView indicators: access, updates, and troubleshooting

step 2: add the IB algo to your chart

  1. open a TradingView chart on the continuous contract for your ticker, like NQ1! or ES1!. the continuous contract is the right one for backtesting, because it stitches the quarterly contracts together.

  2. use regular candlesticks. heikin ashi candles don't match real prices, so they throw off the algo's levels and get orders rejected later.

  3. click indicators in the top toolbar, then invite-only in the left sidebar.

  4. click edgeful - algos - IB strategy.

the invite-only tab in TradingView indicators, showing the edgeful algo scripts

you'll see 7 algo scripts on that list, all starting with "edgeful - algos -": IB and IB breakeven, ORB, ORB 2 TP and ORB breakeven, and engulfing and engulfing 2 TP. everything else edgeful has on the invite-only list is a report indicator. those draw levels and stats on your chart, but they don't take trades and can't be automated.

start with the standard IB. why IB first, and the order to learn the others in, is in which algo should I start with?.

step 3: learn what the algo is showing you

every algo draws the same 3 things when it takes a trade:

  • entry: where it opens the position

  • take-profit: where it closes with a win

  • stop-loss: where it closes with a loss

the IB algo also draws the initial balance itself, the first hour's high and low, as a box. it waits for price to break out of that range and pull back to the level you set, so you'll often see the box well before any entry appears. if no trade shows on a given day, that usually means the day didn't meet your settings, not that something's broken.

the best way to learn it is the IB standard video in edgeful (algos → algo videos), then the full guide: → using the initial balance (IB) algo

step 4: run your first backtest

the algo is the backtest. there's no separate tester to add. as soon as it's on your chart, TradingView's strategy report (at the bottom of the chart) shows how it would have traded.

do this first, every time you add an algo: open the algo's settings (click its name on the chart, then the settings icon), go to the properties tab, and set default order size to quantity, with your contracts per trade as the number. TradingView now defaults this to % of equity, which sizes every futures order to 0 contracts. you'd get no trades, an empty report that says "this report requires trade data", and no alerts later on. → strategy report says "this report requires trade data"

the properties tab with default order size set to quantity

then:

  1. set the chart timeframe you want to test.

  2. use the date range at the top right of the strategy report to set how far back to test. TradingView Premium and higher include deep backtesting, which reaches much further back.

  3. change settings on the algo's inputs tab and watch the report update.

a quick tour of the inputs tab: algo notes at the top is a free-text label for which ticker and settings this copy is for. below it are the session settings, a general section (including max loss $ per trade), and then a block for each weekday, so Monday can trade differently from Friday.

don't judge the algo on its default settings. the defaults are a generic starting point. they aren't tuned to your ticker, session or risk, and on many tickers they'll backtest poorly. that's what step 5, and stage 2, are for.

step 5: load an algo template

algo templates are ready-made settings for each algo and ticker. edgeful runs them through the optimizer on recent history and refreshes them regularly, so they're a far better place to start than the defaults.

  1. in edgeful, open algos → algo templates.

  2. find your algo (IB) and your ticker. templates come in 2 styles: high win rate and high reward. if both cards say no qualifying result yet, no IB setup on that ticker passed the checks on the latest refresh. pick another ticker you'd trade that has one, or run the optimizer yourself (stage 2).

  3. review the settings and backtest, then click run this algo and copy settings.

  4. paste them into the algo on your chart with the edgeful Chrome extension (steps in stage 2), or type them in by hand.

  5. check the strategy report again on your own chart.

algo templates filtered to IB on NQ, New York session

a template is the top result on past data, not a recommendation for your account. treat it as the starting point you'll make your own in stage 2. → algo templates: prebuilt strategies that auto-update

you're done when

  • the IB algo is on your chart with template settings, and

  • the strategy report shows trades on your ticker, and you can point to the entry, take-profit and stop-loss of a few of them on the chart.

common mistakes at this stage

  • order size left on % of equity: no trades, empty report. set it to quantity on the properties tab.

  • wrong TradingView username in algo access: the scripts never appear under invite-only.

  • judging the algo on its defaults: load a template first.

  • adding a report indicator instead of an algo: only the "edgeful - algos -" scripts trade.

  • heikin ashi candles: levels look wrong, and orders get rejected once you automate.

one thing to sort out before you automate

TradingView shows CME futures on a delay unless you add its separate CME real-time data package. that's fine for backtesting, but once you automate, delayed data means late alerts and late entries. add it before stage 3. → enabling real-time CME futures data on TradingView

go deeper

next: stage 2

you've got an algo on your chart and a starting setup. next, make the settings yours: → stage 2: optimizing algos

Did this answer your question?