Premium guide · Start here
GapAlgo Signals
The entry engine. BUY and SELL on a band breakout, with two take profit targets drawn and tracked for you.
What it does
Signals marks the entry and draws the targets. A close beyond a volatility band set around the 20 EMA triggers a BUY or SELL, and two take profit levels are drawn from the close of that bar and tracked until the trade ends.
Signals alternate: after a BUY, the next signal is always a SELL, so a strong trend gives you one label at the start of the move instead of a row of repeats. Every label, target and alert is committed only when the bar closes, so nothing appears and then disappears.
How it works
| Part | What it does |
|---|---|
| Breakout bands | A band 1.5 ATR either side of the 20 EMA. A close through the upper band is a BUY, a close through the lower band is a SELL. |
| EMA crossover markers | Triangles when the 10 EMA crosses the 20 EMA while ADX is above 20, so they only print in a trending market. A heads up, not an entry. |
| Take profit levels | TP1 and TP2 measured from the signal bar's close in multiples of the average bar range (high to low), so an overnight gap cannot stretch the targets on the opening bar. |
| Bar close only | Signals, targets and alerts commit on a closed bar. The script does not repaint. |
Key settings
Names as they appear in the indicator's settings, with the default value.
Show TP levels
Default: On
Turns the target lines and their tracking on or off.
TP1 distance (x avg bar range)
Default: 1.0
How far TP1 sits from the entry.
TP2 distance (x avg bar range)
Default: 3.0
How far TP2 sits. Set it equal to or below TP1 to switch TP2 off, and the trade then ends at TP1.
Show level labels
Default: On
The price labels beside each target line.
Show pending signal preview
Default: Off
Shows a faint BUY? or SELL? while a bar that would trigger a signal is still forming. It is not a signal and it disappears if the bar closes back inside the band.
How to read it
- BUY = price closed above the upper band. This is the entry. SELL = price closed below the lower band.
- Green triangle = bullish EMA crossover in a trending market. Red triangle = bearish crossover. A heads up, not an entry.
- Two lines from the signal = TP1 (thinner, nearer) and TP2 (thicker, further), each with its price. A reached target changes to TP1 ✓ or TP2 ✓.
- The lines extend until the trade ends: when TP2 is reached, or when the next signal prints. Targets still unreached at the next signal fade to grey, so the chart keeps an honest record.
- No stop is drawn. Signals gives you direction and targets. Your stop and position size are yours to set before you enter.
Alerts
- The signal alert fires on bar close with the ticker and price. Choose Any alert() function call when you create it.
- TP1 hit and TP2 hit are separate alert conditions you can add on their own.
To set one up, click Alert on the TradingView toolbar, choose GapAlgo Signals as the condition, then pick the alert you want.
Tip
Want one target? Set TP2 equal to or below TP1. The trade closes at TP1 and the chart stays clean. If you turn on the pending preview, treat nothing as a signal until the bar closes.
For education and information only. No outcome is promised, and nothing here is financial advice.