An ATR-based stop ignores the chart. The swing method reasons differently: for a buy, if price falls back below the recent low, the bullish scenario is contradicted. The stop therefore sits just behind that extreme, and the targets follow from the resulting distance.
How the levels are calculated
Algo Signals looks at the cdN candles before the signal candle (20 by default; the signal candle itself is not counted) and takes the highest high and lowest low of that window. The entry price is the close of the signal candle.
- Stop of a buy: lowest low of the window โ cdBuf ร ATR (margin of 0 by default). Stop of a sell: highest high of the window + the same margin.
- Risk = distance between entry and stop.
- TP1 = entry + rr1 ร risk (rr1 = 1); TP2 = entry + rr2 ร risk (rr2 = 2), in the direction of the trade.
- Fallback: if the stop ends up on the wrong side or less than 0.1 ATR from entry, the method switches to the ATR calculation with its default values (1.5 ATR, 1:1, 1:2).

A worked case

Note the distance: 3.8 ATR, against 1.5 ATR with the ATR method. For the same money at risk (say 1% of capital), a position with such a distant stop must be about 2.5 times smaller. The method has no stop cap: it is up to you to judge whether the distance is acceptable.
Settings and safeguards
- Number of candles (cdN): 20 by default, from 2 to 200. Smaller, the window is short and the stop closer; larger, the stop reaches back to older extremes. In the example, if the 1.0812 low is 14 candles old and cdN becomes 10, it leaves the window: the stop moves up to the lowest remaining low (for instance 1.0830).
- Margin (cdBuf): 0 by default, from 0 to 5 ATR. It moves the stop away from the extreme so that a mere wick does not hit it.
- TP1 ratio (rr1): 1 by default, from 0.2 to 10. TP2 ratio (rr2): 2 by default, from 0.4 to 20.
Explicit-ratio method: your ratios are kept and only the basic checks apply (stop on the losing side, TP1 on the winning side, TP2 farther than TP1). The stop cap (maxSlAtr) and the minimum ratios of the safeguards do not apply to the swing method.
The pitfalls

The stop can be very far if the window contains a large move, which increases the loss per trade. An obvious extreme can also be swept by a wick before price moves on: the cdBuf margin exists for this, without guaranteeing anything.
Key takeaways
- Stop behind the lowest low (highest high) of the previous 20 candles; TP1 and TP2 at 1 and 2 times that distance.
- The stop follows recent structure, not volatility: it can be very far or very close.
- No stop cap: watch the distance and adapt your position size.
- If the extreme is on the wrong side, the method falls back to the default ATR.
- Confluence: a signal resting on a nearby support or resistance (support/resistance method) gives a more readable stop.
๐ Lesson test
Log in to take this lessonโs test. Once you have passed all the tests, you will receive a certificate in your name.
Log inThese lessons are for understanding and are not investment advice. No method guarantees winning.