Strategy library · Candles and price action

Doji at a 20-bar extreme backtest on NQ and ES futures

Doji at a 20-bar extreme

Also called: doji reversal strategy, doji candle strategy, doji at the low, buy when the bar after a doji at a 20-bar low breaks the doji's high, short when the bar after a doji at a 20-bar high breaks the doji's low

What happens if you buy NQ every time the bar after a doji at a 20-bar low breaks the doji's high?

What it is

A doji is a candle whose open and close are nearly equal. This strategy goes long when the bar after a doji at a 20-bar low breaks the doji's high (short on the mirror), with the stop beyond the doji and a target of 2R.

What it did

On NQ futures from 2024-10-08 to 2026-10-07, the doji at a 20-bar extreme strategy took 89 trades on the 15-minute chart, won 43.8% of them and finished -1,028.25 points (-$20,565 on one NQ contract), before commission and slippage. From 2024-10-08 to 2026-10-07 on NQ, the 39 long trades on the 15-minute chart won 51.3% and made -428.50 points (-$8,570 on one NQ contract), before commission and slippage. On ES futures from 2024-08-28 to 2026-08-27, the doji at a 20-bar extreme strategy took 105 trades on the 15-minute chart, won 41.0% of them and finished 64.00 points ($3,200 on one ES contract), before commission and slippage. The 5-minute, 1-hour and daily results for both markets are in the table on this page.

How it was tested

CE Market Solutions tested the doji at a 20-bar extreme strategy on NQ (2024-10-08 to 2026-10-07) and ES (2024-08-28 to 2026-08-27) futures, before commission and slippage, with each signal filled at the next bar's open, intraday positions flat at 15:59 ET and textbook default indicator settings; every trade is listed on this page.

See it tested with one change · $19

Tested by CE Market Solutions on 2026-10-26. Every trade is listed below. Gross, no commission or slippage. Last 2 years.

Results

Rule as tested: Long when the bar after a doji at a 20-bar low breaks the doji's high; short on the mirror. Exit: Stop beyond the doji, target 2R.

TimeframeNQ · 2024-10-08 to 2026-10-07ES · 2024-08-28 to 2026-08-27
TradesWin %Avg ptsProfit factorNet ptsNet $ (1 NQ)Max DD ptsTradesWin %Avg ptsProfit factorNet ptsNet $ (1 ES)Max DD pts
5 minute23234.9%−7.630.765−1,769.25−$35,3852,227.2524329.2%−1.680.752−407.50−$20,375494.00
5 minute · longs only10836.1%——−892.00−$17,8401,336.7510430.8%——−146.50−$7,325209.25
5 minute · shorts only12433.9%——−877.25−$17,545907.2513928.1%——−261.00−$13,050310.00
15 minute8943.8%−11.550.740−1,028.25−$20,5651,281.5010541.0%0.611.08264.00$3,200168.25
15 minute · longs only3951.3%——−428.50−$8,570691.004242.9%——1.00$50115.00
15 minute · shorts only5038.0%——−599.75−$11,995939.006339.7%——63.00$3,150164.50
1 hour3655.6%6.611.206238.00$4,760321.502642.3%−2.070.823−53.75−$2,68798.75
1 hour · longs only1747.1%——−105.50−$2,110312.501747.1%——−78.25−$3,91292.75
1 hour · shorts only1963.2%——343.50$6,870299.75933.3%——24.50$1,22538.75
Daily333.3%139.501.453418.50$8,370923.503100.0%187.83—563.50$28,1750.00
Daily · longs only250.0%——764.00$15,280578.001100.0%——405.50$20,2750.00
Daily · shorts only10.0%——−345.50−$6,910345.502100.0%——158.00$7,9000.00

NQ Daily: small sample (3 trades). ES Daily: small sample (3 trades).

Free to use with credit to CE Market Solutions (CC BY 4.0).

NQ 15 minute: the equity line

Doji at a 20-bar extreme, NQ 15 minute, 2024-10-08 to 2026-10-07. Cumulative points after each trade; low −1,138.75, high 142.75, last −1,028.25.

Long and short

SideTradesNet pts
Long39−428.50
Short50−599.75

By month

MonthTradesNet pts
2024-104−86.25
2024-11123.00
2024-126−4.50
2025-021−113.00
2025-034254.50
2025-044−424.25
2025-055−44.50
2025-064−46.50
2025-07516.25
2025-08748.25
2025-096204.00
2025-102−124.00
2025-112−1.75
2025-123−74.75
2026-012134.75
2026-0224.75
2026-036−291.50
2026-042145.25
2026-055−58.25
2026-066−309.50
2026-072−48.25
2026-083−204.25
2026-09550.75
2026-102−78.50
Every trade, NQ 15 minute89 trades

Pick any of the 89 charted trades with Previous, Next or a date, or click a row in the trades table below, to see it drawn on the real 1-minute bars. Drag the chart sideways to move through the sessions around it.

Chart unavailable. The trades are in the table below.

All trades (89), newest first

Times are New York time; points are gross. Click a row to draw that trade in the chart above.

Session dateSideEntry (ET)Entry priceExit (ET)Exit priceExit reasonPoints
2026-10-06short10:3031501.0010:5331584.00stop−83.00
2026-10-05short15:4531342.7515:5931338.25end of day 15:594.50
2026-09-24short13:3030735.0015:5930756.75end of day 15:59−21.75
2026-09-16long15:4529174.2515:5929254.00end of day 15:5979.75
2026-09-16short12:1529484.5014:3529353.50target131.00
2026-09-03short13:1529491.2513:5129544.25stop−53.00
2026-09-01short11:1529183.0011:3929268.25stop−85.25
2026-08-18long11:3029591.0015:5929585.75end of day 15:59−5.25
2026-08-13short11:0030199.2515:0830267.75stop−68.50
2026-08-11long10:1529762.0012:2529631.50stop−130.50
2026-07-17short11:0028727.0011:5528896.25stop−169.25
2026-07-06short12:3030033.7513:4029912.75target121.00
2026-06-30short11:0030305.2511:5030442.75stop−137.50
2026-06-26short10:4529493.7511:3729665.50stop−171.75
2026-06-23long15:1529673.2515:5929650.50end of day 15:59−22.75
2026-06-18short11:3030582.5012:2130676.00stop−93.50
2026-06-16long12:1530533.0013:3930407.50stop−125.50
2026-06-01long09:4530412.0013:4330653.50target241.50
2026-05-28short14:1530304.0015:5930306.25end of day 15:59−2.25
2026-05-21short14:1529451.7515:5929446.25end of day 15:595.50
2026-05-21long10:0029287.5010:2029173.75stop−113.75
2026-05-14short12:3029727.5013:1629618.00target109.50
2026-05-05short10:1528055.0010:2428112.25stop−57.25
2026-04-15short12:4526146.0014:1626251.75stop−105.75
2026-04-07long11:3024066.7515:4524317.75target251.00
2026-03-26long10:0024215.7510:5524063.75stop−152.00
2026-03-19long10:0024501.5015:5924574.75end of day 15:5973.25
2026-03-16short15:3024683.2515:5924670.25end of day 15:5913.00
2026-03-11short10:3025027.7515:5924984.00end of day 15:5943.75
2026-03-05long09:4525059.5010:3024962.50stop−97.00
2026-03-03short10:0024489.0011:4524661.50stop−172.50
2026-02-24short13:3025019.7515:5925030.00end of day 15:59−10.25
2026-02-18long15:4524942.5015:5924957.50end of day 15:5915.00
2026-01-23short11:3025791.2515:5925735.50end of day 15:5955.75
2026-01-09long10:3025854.2515:5925933.25end of day 15:5979.00
2025-12-30long10:0025756.0010:4325681.50stop−74.50
2025-12-09short11:4525673.2511:5125710.00stop−36.75
2025-12-01long10:0025365.7515:5925402.25end of day 15:5936.50
2025-11-20long14:3024345.5015:3824204.75stop−140.75
2025-11-10long12:0025521.2513:3325660.25target139.00
2025-10-24short12:4525527.5013:4725563.25stop−35.75
2025-10-13short10:3024825.5012:1624913.75stop−88.25
2025-09-29long15:4524822.2515:5924837.25end of day 15:5915.00
2025-09-17short09:4524475.7514:1324363.25target112.50
2025-09-10long15:4523863.0015:5923874.25end of day 15:5911.25
2025-09-08long15:4523799.5015:5923803.75end of day 15:594.25
2025-09-03short11:1523491.7511:2923424.25target67.50
2025-09-01short12:0023495.7512:5923502.25early close−6.50
2025-08-27short14:4523640.0015:1023604.50target35.50
2025-08-26long10:1523507.0015:5923587.00end of day 15:5980.00
2025-08-19long10:1523707.5010:2823638.25stop−69.25
2025-08-18short10:4523751.7515:5923797.00end of day 15:59−45.25
2025-08-13short10:0024017.2511:1023914.25target103.00
2025-08-12short14:4523912.0015:3623933.00stop−21.00
2025-08-06short12:4523351.2513:3623386.00stop−34.75
2025-07-30short15:0023412.2515:5923484.00end of day 15:59−71.75
2025-07-29long12:0023503.7515:3623438.00stop−65.75
2025-07-25long10:0023389.5015:5923422.50end of day 15:5933.00
2025-07-15short09:4523164.2515:5923054.25target110.00
2025-07-14short14:0023045.0015:5923034.25end of day 15:5910.75
2025-06-23long10:0021925.2512:3721758.25stop−167.00
2025-06-20long14:0021838.5015:5921842.75end of day 15:594.25
2025-06-17long15:0021977.2515:5921956.50end of day 15:59−20.75
2025-06-05short12:1521866.7512:4821729.75target137.00
2025-05-27short14:3021461.7515:5921466.50end of day 15:59−4.75
2025-05-27short11:0021355.5011:1921385.50stop−30.00
2025-05-20long15:3021378.0015:5921447.50end of day 15:5969.50
2025-05-13short13:1521307.2513:3221338.75stop−31.50
2025-05-12short15:0020896.0015:5920943.75stop−47.75
2025-04-29short15:0019646.5015:5919644.75end of day 15:591.75
2025-04-28long13:4519323.7515:0219457.25target133.50
2025-04-23long12:4518872.7515:3518746.75stop−126.00
2025-04-04long11:1518089.2513:1617655.75stop−433.50
2025-03-31short12:1519195.0012:2819264.00stop−69.00
2025-03-21long09:4519684.5012:2019849.50target165.00
2025-03-10long15:3019433.7515:5919463.50end of day 15:5929.75
2025-03-04short15:4520526.2515:5920397.50end of day 15:59128.75
2025-02-26long10:0021301.7513:2921188.75stop−113.00
2024-12-19long13:0021519.0015:3521434.00stop−85.00
2024-12-11short14:0021793.0015:1421812.00stop−19.00
2024-12-09short10:1521612.2510:3721538.75target73.50
2024-12-05short10:0021511.0012:1221551.75stop−40.75
2024-12-04short11:3021470.2514:1821497.00stop−26.75
2024-12-03long09:4521191.0015:5621284.50target93.50
2024-11-21short15:4520846.7515:5920823.75end of day 15:5923.00
2024-10-31long12:1520085.0014:0120023.00stop−62.00
2024-10-17long15:0020431.7515:3820365.50stop−66.25
2024-10-11long10:0020358.5010:1620446.50target88.00
2024-10-08short11:1520228.0014:5620274.00stop−46.00

Page 1 of 1

The other trades quoted above

Every trade, ES 15 minute105 trades

Newest first. Times are New York time; points are gross.

Session dateSideEntry (ET)Entry priceExit (ET)Exit priceExit reasonPoints
2026-07-24long15:457442.0015:597447.75end of day 15:595.75
2026-07-17short10:457524.7514:447495.75target29.00
2026-07-07short10:007566.2515:597553.00end of day 15:5913.25
2026-06-23short10:457468.5015:597434.75end of day 15:5933.75
2026-05-21short14:157466.2515:597465.25end of day 15:591.00
2026-05-15short14:307458.2515:597432.50end of day 15:5925.75
2026-05-13long10:157420.2512:247463.25target43.00
2026-05-01long15:157271.7515:597258.75stop−13.00
2026-04-27short14:457203.5015:327207.50stop−4.00
2026-04-21long13:457124.2515:427096.50stop−27.75
2026-04-15short12:457026.0013:347040.50stop−14.50
2026-03-18long14:006730.5014:336714.75stop−15.75
2026-03-18long11:006733.7513:116719.00stop−14.75
2026-03-11short10:306778.2515:596779.75end of day 15:59−1.50
2026-03-06long10:156750.2515:596742.50end of day 15:59−7.75
2026-02-26short15:306914.7515:596921.50end of day 15:59−6.75
2026-02-25short15:306957.7515:486962.50stop−4.75
2026-02-24short11:006882.7511:126895.25stop−12.50
2026-02-23short10:006894.5015:596854.00end of day 15:5940.50
2026-02-18short13:306912.0014:386884.00target28.00
2026-02-16long11:156857.0012:596854.25early close−2.75
2026-02-12long13:456886.7515:466859.75stop−27.00
2026-01-27long10:007005.2515:597008.75end of day 15:593.50
2026-01-26short10:456976.7512:036988.25stop−11.50
2026-01-15short12:307007.0015:006986.00target21.00
2026-01-09long10:306996.2515:597004.75end of day 15:598.50
2026-01-08short13:156955.2515:596960.75end of day 15:59−5.50
2026-01-06short10:456965.7512:386977.50stop−11.75
2025-12-29long09:456960.2512:116942.00stop−18.25
2025-12-22short11:456926.2512:006932.50stop−6.25
2025-12-18short11:306862.0011:376871.50stop−9.50
2025-12-10long10:006849.0014:356886.00target37.00
2025-12-01short14:156845.2514:336823.75target21.50
2025-11-28short12:306849.7512:566857.00stop−7.25
2025-11-17long15:306674.5015:596693.75end of day 15:5919.25
2025-11-13long15:456764.5015:596762.00end of day 15:59−2.50
2025-10-29long12:306939.2514:036929.50stop−9.75
2025-10-21short13:006774.7515:596772.00end of day 15:592.75
2025-10-16long14:456660.7515:596668.50end of day 15:597.75
2025-10-03short11:156790.5011:526795.75stop−5.25
2025-10-03short10:156778.7510:316788.50stop−9.75
2025-09-29long14:006707.2515:156699.25stop−8.00
2025-09-22short15:456752.5015:596751.75end of day 15:590.75
2025-09-19short09:456700.5013:336712.75stop−12.25
2025-09-17short10:156663.5014:006676.00stop−12.50
2025-09-16short15:306670.5015:596668.25end of day 15:592.25
2025-09-10long15:456534.5015:596539.25end of day 15:594.75
2025-09-03long13:156447.2513:436435.75stop−11.50
2025-08-28short10:006486.7512:286508.75stop−22.00
2025-08-14short11:156482.7515:556495.50stop−12.75
2025-08-13short15:456481.7515:516487.75stop−6.00
2025-08-13short10:156491.5012:506469.00target22.50
2025-08-08short11:006400.2512:166413.25stop−13.00
2025-07-23long10:306364.0013:466385.50target21.50
2025-07-18short09:456344.7512:266326.75target18.00
2025-07-17short12:306329.5014:236336.75stop−7.25
2025-07-10short14:456330.0015:526318.50target11.50
2025-06-26short12:456184.0013:116187.75stop−3.75
2025-06-09short14:456021.7515:596009.25target12.50
2025-06-02short13:305919.2514:155927.25stop−8.00
2025-05-26long11:305881.7512:595891.00early close9.25
2025-05-22short14:455881.0014:565889.50stop−8.50
2025-05-21short10:305926.2511:085944.75stop−18.50
2025-05-20long15:305944.2515:595959.25end of day 15:5915.00
2025-05-14short10:005910.5015:595909.50end of day 15:591.00
2025-04-28long13:455507.2515:015533.75target26.50
2025-04-23long12:455418.0015:365384.75stop−33.25
2025-04-21long14:305142.2515:505172.75target30.50
2025-04-17long10:005334.0010:205309.50stop−24.50
2025-04-15long14:455438.2515:595427.75end of day 15:59−10.50
2025-03-31short12:155590.2512:285607.00stop−16.75
2025-03-24short11:455808.7512:015815.25stop−6.50
2025-03-14short12:155618.7513:015635.75stop−17.00
2025-03-13long14:155541.0015:595528.25end of day 15:59−12.75
2025-03-12short15:155615.7515:595602.75end of day 15:5913.00
2025-03-04long10:455775.0014:025837.50target62.50
2025-02-26long14:305960.7515:595972.00end of day 15:5911.25
2025-02-26long10:006004.7513:025978.00stop−26.75
2025-02-20long10:306123.7515:596137.25end of day 15:5913.50
2025-02-10short11:156087.7512:106073.75target14.00
2025-02-06long11:156099.7514:306085.00stop−14.75
2025-01-28short11:306065.2512:106087.50stop−22.25
2025-01-24short10:156149.5014:106123.50target26.00
2025-01-23short15:456134.0015:506139.50stop−5.50
2025-01-17short09:456018.7510:506035.75stop−17.00
2025-01-15short15:455995.0015:595988.50end of day 15:596.50
2025-01-15short10:455979.0014:285992.00stop−13.00
2024-12-19long13:305969.7515:355945.25stop−24.50
2024-12-19long13:005963.2513:035947.25stop−16.00
2024-11-20long10:455902.2515:595939.25end of day 15:5937.00
2024-11-14long13:155997.5015:045978.50stop−19.00
2024-11-05short13:155802.5015:595811.25stop−8.75
2024-10-31long12:155765.0014:015750.25stop−14.75
2024-10-30short12:155880.5013:285867.50target13.00
2024-10-07short10:455779.5014:305760.50target19.00
2024-09-30short11:455788.5012:035794.25stop−5.75
2024-09-27long15:005800.2515:595791.00end of day 15:59−9.25
2024-09-24long11:005773.7515:595793.00end of day 15:5919.25
2024-09-18short14:005700.2514:005712.25stop−12.00
2024-09-17short10:005715.5010:075727.25stop−11.75
2024-09-11short09:455475.0013:405507.75stop−32.75
2024-09-06short10:005495.7511:465421.75target74.00
2024-09-03long13:305578.2513:435568.25stop−10.00
2024-09-02short11:305661.7512:595665.00early close−3.25
2024-08-30short10:305636.2511:205616.25target20.00

Questions and answers

What happens if you buy NQ every time the bar after a doji at a 20-bar low breaks the doji's high?

From 2024-10-08 to 2026-10-07 on the NQ 15-minute chart, the doji at a 20-bar extreme strategy took 39 long trades, won 51.3% of them and made -428.50 points (-$8,570 on one NQ contract), before commission and slippage. From 2024-10-08 to 2026-10-07 on NQ, its long trades also made -892.00 points on 108 trades on the 5-minute chart, -105.50 points on 17 trades on the 1-hour chart and 764.00 points on 2 trades on the daily chart, before commission and slippage.

What happens if you short ES every time the bar after a doji at a 20-bar high breaks the doji's low?

From 2024-08-28 to 2026-08-27 on the ES 15-minute chart, the doji at a 20-bar extreme strategy took 63 short trades, won 39.7% of them and made 63.00 points ($3,150 on one ES contract), before commission and slippage. From 2024-08-28 to 2026-08-27 on ES, its short trades also made -261.00 points on 139 trades on the 5-minute chart, 24.50 points on 9 trades on the 1-hour chart and 158.00 points on 2 trades on the daily chart, before commission and slippage.

Does the doji at a 20-bar extreme strategy work on Nasdaq futures?

On NQ futures from 2024-10-08 to 2026-10-07, the doji at a 20-bar extreme strategy on the 15-minute chart took 89 trades, won 43.8% of them and finished -1,028.25 points (-$20,565 on one NQ contract), before commission and slippage.

What is the win rate of Doji at a 20-bar extreme on ES futures?

The doji at a 20-bar extreme strategy won 41.0% of its 105 trades on the ES 15-minute chart from 2024-08-28 to 2026-08-27, before commission and slippage. On ES from 2024-08-28 to 2026-08-27 it also won 29.2% of 243 trades on the 5-minute chart, 42.3% of 26 trades on the 1-hour chart and 100.0% of 3 trades on the daily chart, before commission and slippage.

Is the doji at a 20-bar extreme strategy better on the 5-minute, 15-minute, 1-hour or daily chart for NQ?

On NQ from 2024-10-08 to 2026-10-07, the doji at a 20-bar extreme strategy made -1,769.25 points on 232 trades on the 5-minute chart, -1,028.25 points on 89 trades on the 15-minute chart, 238.00 points on 36 trades on the 1-hour chart and 418.50 points on 3 trades on the daily chart, before commission and slippage.

Is it better to only buy or only sell doji at a 20-bar extreme signals on NQ?

On the NQ 15-minute chart from 2024-10-08 to 2026-10-07, the long trades made -428.50 points on 39 trades (51.3% won) and the short trades made -599.75 points on 50 trades (38.0% won), before commission and slippage.

How many trades does the doji at a 20-bar extreme strategy take on NQ in two years?

The doji at a 20-bar extreme strategy took 89 trades on the NQ 15-minute chart from 2024-10-08 to 2026-10-07, before commission and slippage. On NQ from 2024-10-08 to 2026-10-07 it also took 232 on the 5-minute chart, 36 on the 1-hour chart and 3 on the daily chart, before commission and slippage.

What is the max drawdown of the doji at a 20-bar extreme strategy on NQ?

The doji at a 20-bar extreme strategy had a max drawdown of 1,281.50 points ($25,630 on one NQ contract) on the NQ 15-minute chart from 2024-10-08 to 2026-10-07, before commission and slippage. On NQ from 2024-10-08 to 2026-10-07 its max drawdown was also 2,227.25 points on the 5-minute chart, 321.50 points on the 1-hour chart and 923.50 points on the daily chart, before commission and slippage.

How does the doji at a 20-bar extreme strategy do on ES compared with NQ?

On the ES 15-minute chart from 2024-08-28 to 2026-08-27, the doji at a 20-bar extreme strategy took 105 trades, won 41.0% of them and made 64.00 points ($3,200 on one ES contract), before commission and slippage. On the NQ 15-minute chart from 2024-10-08 to 2026-10-07, the doji at a 20-bar extreme strategy took 89 trades, won 43.8% of them and made -1,028.25 points (-$20,565 on one NQ contract), before commission and slippage.

How these were run

  • Gross: no commission and no slippage.
  • The last 2 years of each market, from the first to the last session of its window.
  • A signal on a closed bar fills at the next bar’s open.
  • A stop and a target touched in the same minute count as the stop.
  • Intraday positions are flat at 15:59 ET.
  • Textbook TradingView default settings for every indicator; nothing is tuned.

Want your own rules tested the same way?