LuxAlgo indicator: does it repaint, and how to test its signals
The LuxAlgo indicator is a set of TradingView scripts that draw buy and sell labels, levels and trend tools from standard indicator ideas. A label is only useful once you have checked it for repainting with a bar-by-bar replay and tested it as a written rule, with costs, on data the rule never saw.
By Soren Huang · Published · updated · Editorial policy
Contents
- What is the LuxAlgo indicator and what does it draw on a chart?
- Is the LuxAlgo free version enough?
- Does LuxAlgo repaint? How to check hindsight in a signal display
- How do you turn a LuxAlgo signal into entry and exit rules?
- Are LuxAlgo signals accurate? Test with costs and out-of-sample data
- Is LuxAlgo good? Four things a signal screenshot cannot tell you
- Frequently asked questions
- References
What is the LuxAlgo indicator and what does it draw on a chart?
The LuxAlgo indicator is a set of TradingView scripts that draw buy and sell labels, support and resistance levels and trend tools from standard indicator ideas. Any script that draws on a forming bar can repaint, so check it with a bar-by-bar replay, then test each signal as a written rule, with costs, on held-out data.
LuxAlgo publishes indicator scripts for the TradingView charting platform. Some are free public scripts that anyone can add to a chart. Others are paid scripts that sit behind a subscription. Whatever the price, the scripts draw four kinds of overlay on a candlestick chart:
- Buy and sell labels. These come from trend and momentum conditions, the same family of ideas as a moving average crossing price or an oscillator leaving an extreme zone.
- Support and resistance levels. These are lines drawn from recent swing highs and swing lows, the points where price turned.
- Trend tools. A line or a colored band that changes color with the direction of a smoothed price, built from moving averages.
- Alerts. A notification sent when one of the conditions above becomes true.
None of these needs data from outside the chart. That is different from market breadth indicators for index futures, which need a second data series of advancing and declining stocks. Everything a label depends on is already in the open, high, low and close of the bars you see, which is why the signal can be replayed on old prices at all. The oscillator part uses the same ideas as the stochastic oscillator and its %K and %D lines: a reading of where the close sits inside a recent range. Which of these building blocks can be written as a test, and which only decorate a chart, is sorted out in the guide to technical analysis tools you can test.
Is the LuxAlgo free version enough?
The free scripts are enough to study what each signal does bar by bar, because free versus paid is not what decides whether a signal is useful. What decides it is whether the signal can be written as a rule and replayed on old prices after commission and slippage. A free script shows you where the labels fall and lets you watch how they appear and disappear while bars form. That is all you need for the two checks in the next sections. The paid scripts add more tools and alert options behind a subscription, but they are still a display layer, and a display layer cannot grade itself.
The table below separates what each source gives you. The last three rows are the ones a trader actually needs before risking money, and none of them comes from a chart overlay, free or paid.
| What you get | Free scripts | Paid scripts | Your own backtest |
|---|---|---|---|
| Signal labels on the chart | Yes | Yes | Yes, as recorded entries |
| Support and resistance levels | Yes | Yes | Only if you write them as a rule |
| Alerts | Yes | Yes | Not needed |
| Written entry and exit rule | No | No | Yes |
| Commission and slippage charged | No | No | Yes |
| Result on data the rule never saw | No | No | Yes |
So the practical answer to "is the free version enough" is yes, for the job that matters: learning the signal well enough to write it down. Pick one free script, one market and one bar size, and spend an hour watching how its labels behave before you spend anything.
Does LuxAlgo repaint? How to check hindsight in a signal display
Any signal that is drawn before its bar closes, or that moves after later bars arrive, shows hindsight, and a bar-by-bar replay is how you find out whether a given script does this. Repainting is the behavior of a chart signal that changes, moves or disappears after later bars arrive, so that the chart you look at later is not the chart you would have seen at the time. A repainting label looks accurate in a screenshot because every label that turned out wrong has already been erased.
Hindsight gets into a display in three common ways:
- Drawing on the forming bar. While a bar is still open, its high, low and close keep changing. A condition that is true at 10:15 can be false at the close. If the script draws as soon as the condition is true, you see labels that may not survive the close.
- Using a higher timeframe value before it is final. A daily value read on an hourly chart is not known until the day ends. A script that uses the finished daily value during the day knows the future of that day.
- Drawing on smoothed candles. A signal on Heikin Ashi candles is placed at an averaged price, not a price that traded. Any fill it implies must be checked against the real open of the next bar.
The replay check takes about an hour and needs no code. TradingView has a replay mode that steps the chart forward one bar at a time.
- Open the script on a chart, start replay mode about 100 bars back, and write down the bar size.
- Step forward one bar at a time. Each time a label appears on the forming bar, note the bar number and the label type.
- Step on two or three more bars. Check whether the label is still there, has moved, or has gone.
- Count. A good result is zero labels that moved or vanished out of, say, 30 noted labels. A bad result is labels that vanish mainly on bars that would have been losing trades.
Repainting is one form of the broader problem described in look-ahead bias in backtests and the one-bar check: a rule that knows something it could not have known at the time. The cure is the same in both cases. Evaluate every condition on closed bars only, and act on the next bar.
How do you turn a LuxAlgo signal into entry and exit rules?
A chart label is only a display layer; it becomes a testable strategy once you write it as a plain condition evaluated at bar close and add a fixed exit, next-bar execution and costs. Next-bar execution is the rule that a signal read at the close of one bar is filled at the open of the next bar, never at the close it was read from. Without these additions you have a picture of where arrows fell. With them you have a list of trades, each with a recorded entry, exit and net result.
The steps, in order:
- Write the signal as a bar-close condition. One sentence, using only values known at the close. For example: "the close is above a 20-bar moving average and the oscillator left its lower zone on this bar." If you cannot write the sentence, you cannot test the label.
- Add a fixed exit rule. A label tells you when to enter; it rarely tells you when to leave. Choose one exit and keep it: the opposite label, a fixed number of bars, or a fixed stop and target in ticks.
- Set commission, slippage and next-bar fills. Use your broker's commission and at least one tick of slippage per side for a liquid future.
- Split the history by date into a part used for choosing settings and a later part kept for judging. The next section explains the split and shows a report.
- Read the average trade after costs on the later part, together with the trade count and the drawdown.
Hypothetical example
Suppose a buy label condition, written as a bar-close rule with the opposite label as the exit, fires 120 times over six years of daily bars on one index future. The gross average trade is $400. Commission is $5 per side and slippage is one tick of $12.50 per side, so the round trip costs $35. The net average trade is $365, and the 120 trades net about $43,800. If the same rule had fired 1,200 times on hourly bars with a gross average trade of $50, the same $35 round trip would leave $15 per trade, and a second tick of slippage would turn it negative. The exit and the costs decide the result as much as the label does.
The loop in the figure matters. If the result in step 5 makes you want a different exit or a different lookback, that is a new candidate, and it must be judged on data it has not seen. In AlphaPrime (Valynox), this is what strategy generation does when it turns an indicator idea into candidates: every candidate carries its own entry condition, exit condition and parameter range from the start, so there is never a label without an exit attached.
Are LuxAlgo signals accurate? Test with costs and out-of-sample data
Accuracy is read from a backtest with costs on a period split by date, not from marked-up charts. In-sample data is the earlier part of the history that you use to choose the rule and its settings. Out-of-sample data is the later part that you keep untouched and run the finished rule on, once, to see how it behaves on prices it never saw. The full method, including how many trades the later part needs, is in in-sample vs out-of-sample: how to split and how much is enough.
To show what such a report looks like, we ran a stand-in rule through the AlphaPrime engine. The run tested a rule built from a standard indicator, an efficiency-adaptive moving average used as the only entry and exit, with no stop, no target and no filter. It is not a LuxAlgo script; it is the kind of trend-colored moving line a signal package draws, written as a rule so it can be judged. The market was the E-mini S&P 500 future (ES) on daily bars, from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage charged on every trade.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $115,662.5 |
| Max drawdown | $63,012.5 |
| Trades | 65 |
| Win rate | 66.15% |
| Profit factor | 1.981 |
| Average trade | $1,779.42 |
| Time in market | 93.01% |

Three things in this report are worth reading the way you would read your own. First, the candidate shown is the one the search kept out of 1,024 it tried, chosen for its return against its drawdown. Picking the kept one after the fact flatters its in-sample number: among 1,024 variants, some will look good on the tuning period by chance alone. Bailey, Borwein, López de Prado and Zhu (2014) show that the more variants you compare on one history, the better the best one looks even when none has an edge. The kept candidate did not "earn" $115,662.5 in any sense a reader can expect; it is the recorded result of one rule on one past period after one selection. Second, the time in market of 93.01% says the rule is almost always holding a position, long or short, because it has no stop and flips at each crossing. A signal package that draws arrows only at crossings hides this. Third, 65 trades over six and a half years is a small sample, so the average trade of $1,779.42 can move a long way if a few trades are replaced.
This is why the out-of-sample stretch marked in the equity figure is the part to look at. The in-sample part was used to choose the card; only the later part can grade it. Sullivan, Timmermann and White (1999) tested thousands of technical trading rules on long stock histories and found that the best rule's record shrank sharply once the number of rules tried was taken into account. Harvey and Liu (2015) propose discounting any backtest result for the number of tests behind it. For your own LuxAlgo-style rule the practice is simple: fix the settings on the earlier part, run once on the later part, and read the average trade after costs there.
Is LuxAlgo good? Four things a signal screenshot cannot tell you
Whether LuxAlgo is good for you is decided by your own test record, not by the chart, because four things no signal screenshot shows are exactly what separate a picture from evidence. This is true of every signal package, LuxAlgo or any other. A screenshot of a price stretch with buy and sell arrows cannot answer the following questions, and the trade list from your own backtest answers all four.
| Open question | Why the screenshot cannot answer it | Where the answer is |
|---|---|---|
| What exact exit will I use? | Arrows mark entries; the exit is implied by the next arrow or not shown at all | The fixed exit column of the trade list |
| What does each trade cost me? | Arrows are free; a round trip on a future is not | The commission and slippage column |
| How does the rule behave on data it never saw? | Every screenshot is a look back at a stretch already known | The trades to the right of the out-of-sample line |
| How many variants were tried before this one? | The screenshot shows one setting; the search that produced it is invisible | Your own record of candidates, written before the run |
None of this requires a subscription or code. It requires writing one condition down, choosing one exit, charging realistic costs and keeping a later block of data untouched. A good test record shows a positive out-of-sample average trade that is several times the round-trip cost, from enough trades that a handful of them cannot flip the sign. A bad record shows a steep in-sample curve and a flat or falling out-of-sample stretch, or a result that disappears when slippage is doubled.
Your next step: take one free script, write its buy condition as a single sentence that uses only closed-bar values, and replay 100 bars to count how many labels move or vanish. Then run that sentence as a rule on your own daily data for one market, with your broker's commission and one tick of slippage per side, and read the average trade after costs on the last two years only.
Frequently asked questions
Is the LuxAlgo indicator free on TradingView?
Some LuxAlgo scripts are free public scripts that anyone can add to a TradingView chart. Others are paid scripts behind a subscription. The free scripts are enough to watch how a signal behaves bar by bar and to write it down as a rule, which is the part that matters for testing.
What does it mean when an indicator repaints?
Repainting means a signal on the chart changes, moves or disappears after later bars arrive. The usual cause is drawing on a bar that has not closed yet, or using a higher-timeframe value before it is final. A repainting signal looks accurate in hindsight because the labels that turned out wrong have already been erased. Check for it by stepping through the chart in replay mode and comparing each label with what remains after the bar closes.
Can I backtest LuxAlgo signals without coding?
Yes, if you can write the signal as one plain sentence that uses only values known at the bar close. Add a fixed exit, commission and slippage, and next-bar fills, then run it on your own historical bar data with the history split by date. If you cannot write the sentence, the signal cannot be replayed, and no tool can test it.
How many trades do I need before trusting a signal's result?
Enough that replacing a few trades cannot change the sign of the average trade. Many systematic traders treat fewer than about 30 out-of-sample trades as a hint and aim for a few hundred before trusting a per-trade figure. A daily-bar rule that trades a few times a month needs many years, or a walk-forward design, to reach that count.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Sullivan, R., Timmermann, A., & White, H. (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. The Journal of Finance, 54(5), 1647–1691.
- Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.

