Skip to main content

stage 2: optimizing algos

find settings for your ticker, apply them in one click, and know what to expect

Written by Brad

summary: stage 2 of 4. find settings that fit your ticker with the algo optimizer, copy them onto your chart in one click with the edgeful Chrome extension, and learn the one rule that applies every time you change a setting from here on.

haven't done stage 1 yet? start with stage 1: setting up algos. the full path is in edgeful algos: start here.

video walkthrough

prefer to watch first? this video goes from finding a strong algo setup in the optimizer to copying its settings into TradingView with the Chrome extension:

what you'll do in this stage

this matches the optimize algo column of the start here checklist in edgeful:

  1. run the optimizer on your algo and ticker

  2. check the result before you use it

  3. apply the settings with the Chrome extension

  4. learn the new-alert rule

  5. write down what normal looks like

template or optimizer? the template you loaded in stage 1 is a solid starting point. the optimizer is how you fit the algo to your ticker, session, contract size and risk. most people start from the template and then run the optimizer around it.

step 1: run the optimizer

  1. in edgeful, open algos → algo optimizer.

  2. choose your algo, ticker, chart timeframe and contract size, then the backtest period.

  3. set validation to holdout. holdout holds back the most recent part of the data, finds settings on the rest, then checks them on data they've never seen. that's your best protection against settings that only worked by luck.

  4. set any constraints you care about (like a maximum drawdown), then run it.

  5. look through the top-ranked results, not just the first row.

the algo optimizer set to IB on NQ with holdout validation, and its ranked results

the optimizer is futures only, and it works with edgeful's own algos. you can't upload your own script to it. full guide: → algo optimizer. holdout in plain english: → understanding holdout, in-sample, and out-of-sample

step 2: check the result before you use it

open the result you like and check:

  • the strategy health card shows low overfit risk

  • the out-of-sample columns hold up: the results on the held-back data don't drop off sharply

  • there are enough trades to mean something (a few dozen at least)

  • the max drawdown and longest losing streak are ones you could sit through without switching the algo off

the strategy health card showing low overfit risk

if a result fails these, pick another one or change your search. a setup that's overfit in the backtest won't get better live, at any size.

step 3: apply the settings with the Chrome extension

a tuned algo can have 40+ fields across the weekdays, and copying them by hand is where settings get missed. the edgeful algos settings Chrome extension fills them all at once. it works on TradingView in Google Chrome (tradingview.com), not the desktop app.

  1. install edgeful algos settings from the Chrome Web Store and pin it to your toolbar.

  2. in the optimizer, open your result, click algo settings or run this algo, then copy settings.

  3. in TradingView, open the algo's settings on your chart and leave it open on the inputs tab.

  4. click the extension icon, then apply optimizer settings.

  5. check the list of fields it updated. if it says some need review, set those fields by hand from the optimizer's values.

  6. click ok to save.

2 things the extension doesn't do for you: set your chart timeframe to the one in the optimizer result, and check that default order size on the properties tab matches the optimizer's contract size. the extension also writes the ticker, timeframe and date range into algo notes, so you can tell your copies apart later.

full guide, including every extension message: → copy your optimizer settings to TradingView with the chrome extension

step 4: the new-alert rule

this matters from stage 3 onward, so learn it now: any time you change a setting on the algo, delete its TradingView alert and create a new one.

an alert locks in the algo's settings at the moment you create it. edit the algo afterwards and the old alert keeps trading the old settings, with no warning. you can't edit an alert into the new settings either. it has to be a new alert.

  • the webhook URL and alert message stay the same. they belong to your strategy in the edgeful dashboard, not to the algo's settings.

  • after you create the new alert, open TradingView's alerts panel and delete any old copy that's still running.

  • settings that live on the algo (and need a new alert when they change): session, range timeframe, entry cutoff, size filters, take-profit and stop-loss, max loss, per-weekday rules, direction and contracts per trade.

  • settings that live in the edgeful dashboard: strategy name, broker account, order types, enabled/disabled and the webhook. changing the order types or broker account also needs a new alert.

script updates are different. when edgeful updates an algo script, you'll see a purple update icon on the algo in TradingView. click it to apply the update. small fixes don't need new alerts. if the update changes how the algo trades, recreate your alerts. not sure which it is? ask us in the chat.

step 5: write down what normal looks like

before you automate anything, note 3 numbers from the backtest of the settings you're about to run: the max drawdown, the longest losing streak and the average trades per week.

those are your yardstick once you're live. a losing streak inside that range is the algo behaving normally, not breaking. live results will also never match the backtest exactly, because of fills, slippage and timing. → what to expect from algos: drawdowns, losing streaks, and when to change settings and why your backtest, optimizer, and live results don't match

when nothing looks good

if every result fails something, that's the tools doing their job. a few things to try before you give up:

  • try another ticker. the micros (MES, MNQ, MYM, M2K) can behave quite differently from each other.

  • try another chart timeframe or range length.

  • try another algo. a breakout algo and a pullback algo want different market conditions.

  • lengthen the backtest period, and try cutting a weak weekday or session.

never trade a setup that falls apart on the held-back data, or one where a handful of trades make all the profit. if you've widened the search and nothing holds up, "no edge right now" is a real answer, and it's cheaper to learn in the optimizer than live. you can also book a refine algo call (in the algos sidebar) to go through your results with someone.

you're done when

  • your chosen settings are applied to the algo in TradingView, with the matching chart timeframe and contract size, and

  • you've written down the max drawdown and longest losing streak you expect from them.

common mistakes at this stage

  • missing a weekday when copying by hand. use the extension.

  • forgetting the chart timeframe: the extension doesn't set it.

  • editing an alert instead of recreating it: the old settings keep trading.

  • picking the result with the highest P&L instead of the one that holds up out-of-sample.

  • leaving an old alert running next to the new one.

go deeper

next: stage 3

your settings are ready. next, connect a broker and let edgeful place the trades: → stage 3: automating algos

Did this answer your question?