What each field becomes
A no-code builder is a form that writes Pine. Knowing what each step turns into is what lets you read your own export and confirm it matches what you asked for.
The AlfaTactix Strategy Builder has 7 steps, and you choose TradingView as the platform in Step 1.
| Step of the form | What you set | What it becomes in the Pine file |
|---|---|---|
| 1. Information and platform | the name, and TradingView as the platform | a Pine Script v6 strategy() script with that name |
| 2. Timeframes | the trading timeframe and up to two higher ones | the timeframes each indicator is read on |
| 3. Entry rules | indicators from 47 built-in types, their settings, and the conditions | an input for each numeric setting, each indicator written out as its own function, and the entry conditions built from your rules |
| 4. Filters | up to 8 filters, such as a session or time window | conditions that must hold before an entry |
| 5. Exits | stop, target, trailing stop, breakeven, partial closes, exit rules, time exits | the exit orders, strategy.exit() among them |
| 6. Risk and money management | the size of each trade (six sizing types) and the account limits | the size of each order, computed in the file from your sizing rule |
| 7. Review and save | a last check of the whole strategy | the strategy you then download as a .pine file |
What you get is one Pine Script v6 strategy() file to paste into the Pine
Editor. Every indicator is written out in it as code you can read, and its
header names the generator version. Each Pine script we checked compiled in
the Pine Editor with 0 problems. Costs are not a step of the form: on TradingView
you set commission and slippage in the strategy's Properties tab. To move a
strategy to MetaTrader 5, switch the platform in Step 1; the form first lists
the settings that change.
When you are ready to set these steps for your own rules, open the Pine Script generator.
Why an indicator must run on every bar
The export uses no ta.* built-ins: each indicator is written out in the file
as its own function and called on every bar. That is worth keeping if you edit
the file by hand, because it is invisible in behaviour until it is wrong.
// correct — runs on every bar, so its history is continuous
rsiVal = ta.rsi(close, rsiLen)
if rsiVal < 30 and close > maVal
strategy.entry("Long", strategy.long)
// wrong — v6 short-circuits and, so ta.rsi() is skipped on bars
// where the first condition is false, and its history breaks
if close > maVal and ta.rsi(close, rsiLen) < 30
strategy.entry("Long", strategy.long)
In v6 the and and or operators evaluate lazily [6], so a call on the right
of a false condition does not run on that bar. Indicators keep internal state
between bars, so one that did not run on every bar no longer holds the history
it needs — and nothing reports it.
So: if you add a ta. call by hand, keep it out of the right side of any
and or or. Search the file for and and or after each edit; it takes
ten seconds.
The anatomy of a generated export
Generated files follow a fixed order, which makes them quick to navigate:
//@version=6and a header naming the strategy and the generator versionstrategy(...)— the declaration, where your results are decided- the
input.*declarations — every numeric setting the settings dialog will show - the indicator section — one function per indicator, called on every bar
- the rules — the entry conditions and the filters
- the orders and exits —
strategy.entry(),strategy.exit()and the risk limits
Block 2 is the one to read first and the one people skip. Blocks 3 and 5 together are where you verify that each control actually feeds a comparison — if you edit the file by hand and a threshold appears as a bare number in block 5 while block 3 declares an input for it, that control does nothing.
The check that closes the loop
Move one input to an extreme in the settings dialog and confirm the trade count changes. An input declared in block 3 but never referenced in block 5 renders a control that moves and has no effect, and there is no way to see that from the interface. Details of what else to verify are in the editor versus the builder.
What testing ten variations does to your results
Testing ten variations in an afternoon is the thing a no-code builder is genuinely good at. It is also, done carelessly, the fastest way to produce a number that means nothing — and that has a name in the literature.
The best of ten is not the best
If you test ten variations and keep the one with the highest return, that return is a biased estimate of what the variation will do next. You did not find the best strategy; you found the variation that best fitted the noise in this particular sample. The selection step is what introduces the bias, and it happens whether or not you intended to search.
This is data snooping, and it has been studied specifically on technical trading rules. Sullivan, Timmermann and White (1999) re-examined the performance of technical trading rules while accounting for the fact that many rules had been tried on the same data [7]. White's Reality Check gives the method for asking whether the best of many strategies genuinely beats a benchmark, rather than merely appearing to [8].
Harvey, Liu and Zhu (2016) make the consequence concrete in a related setting: once you account for how many candidates have been tried, the significance hurdle any single survivor must clear goes up, not down [9].
The practical translation is uncomfortable and short: ten tests make your best result less trustworthy than one test would have.
Why it feels like the opposite
Because testing more feels like working harder, and because the tool reports each test in isolation. The Strategy Tester shows you the result of variation seven. It has no idea that variations one through six existed, so it cannot discount the number it is showing you — and nothing in the interface will ever tell you that you have searched.
Curve-fitting also leaves no trace in the source. The code is clean, the costs are honest, the backtest is correct. Only the history of your own search distinguishes a discovered edge from a selected coincidence, and that history lives in your head.
The count is part of the result
So the number to write down is not just the return. It is:
"Best of N variations tested, on this instrument, over this date range."
Report the return without the N and you have published something unverifiable. Report it with the N and a reader can judge it. This is the same reproducibility point as stating your TradingView plan when you quote a backtest — see the Strategy Tester versus live trading for why the plan changes the result too.
A protocol that survives ten tests
The answer is not to stop searching. Searching is how anything is found. The answer is to fix the rules of the search before it starts, because every decision you make after seeing a result is another selection step.
Decide these four things before the first test
| Decide in advance | Why it must be before |
|---|---|
| the metric you will judge on | choosing the metric after seeing results is picking the one that flatters |
| the date range you will test on | shortening a range because it "isn't representative" is fitting |
| the number of variations you will try | otherwise you stop when you are happy, which is never a neutral moment |
| a hold-out window you will not look at | it is only out-of-sample if you have not seen it |
The fourth is the one people skip, and it is the only one that produces evidence. Reserve a stretch of history — the most recent chunk is the honest choice — and do not run a single test on it until the search is finished. You get exactly one look. If the winner falls apart there, the search found noise, and that is worth knowing in an afternoon rather than in live trading.
Prefer a plateau to a peak
This one costs nothing and is the most informative thing you can do with ten results. Line the variations up in parameter order and look at the shape:
- a peak — one good result with bad results on either side — is almost certainly a fit. Nothing about markets says that a 14-period lookback works and 13 and 15 do not.
- a plateau — a band of neighbouring values that all work acceptably — is a property of the instrument. Pick the middle of the plateau, not the highest point on it.
The highest bar in a set of ten is the one most likely to be high by luck. Choosing its neighbour costs you a little reported performance and buys you the only robustness evidence available without a second dataset.
Change one thing at a time
Ten variations that each differ in three ways teach you nothing about which change mattered. Ten that differ in one dimension — a single threshold, a single period — produce the parameter surface described above. It is the same number of tests and a completely different amount of information.
Check the trade count before you rank
A short-timeframe variation over a long range can hit TradingView's order cap and report a flat curve that looks like a bad strategy rather than a truncated test, and every variation sees only the history your plan allows. Both limits are set out in the Strategy Tester versus live trading.
Then write down the count
Best of ten, on this instrument, over this range, judged on this metric, with a hold-out result of X. That sentence is worth more than the return on its own, and it is the thing you will want when you look at this strategy again in three months and cannot remember how hard you had to look for it.

