{"id":504,"date":"2026-08-10T08:41:28","date_gmt":"2026-08-10T08:41:28","guid":{"rendered":"https:\/\/www.stockmaster.in\/universe\/?p=504"},"modified":"2026-08-10T09:02:48","modified_gmt":"2026-08-10T09:02:48","slug":"a-candlestick-detective","status":"publish","type":"post","link":"https:\/\/www.stockmaster.in\/universe\/a-candlestick-detective\/","title":{"rendered":"Candlestick Detective"},"content":{"rendered":"<div id=\"sm-candlestick-detective\">\r\n\r\n<style>\r\n#sm-candlestick-detective{\r\n--purple:#6d3df5;\r\n--dark:#171329;\r\n--bg:#f5f3fb;\r\n--card:#fff;\r\n--green:#16a34a;\r\n--red:#dc2626;\r\n--blue:#2563eb;\r\n--orange:#f59e0b;\r\nfont-family:Arial,Helvetica,sans-serif;\r\nmax-width:1150px;\r\nmargin:20px auto;\r\ncolor:#171329;\r\n}\r\n\r\n#sm-candlestick-detective *{\r\nbox-sizing:border-box;\r\n}\r\n\r\n.scd-head{\r\nbackground:linear-gradient(135deg,#21133f,#7042ef);\r\ncolor:#fff;\r\npadding:22px;\r\nborder-radius:20px 20px 0 0;\r\n}\r\n\r\n.scd-title{\r\nfont-size:29px;\r\nfont-weight:900;\r\n}\r\n\r\n.scd-sub{\r\nfont-size:13px;\r\nopacity:.85;\r\nmargin-top:5px;\r\n}\r\n\r\n.scd-stats{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(5,1fr);\r\ngap:10px;\r\nmargin-top:18px;\r\n}\r\n\r\n.scd-stat{\r\nbackground:rgba(255,255,255,.12);\r\npadding:11px;\r\nborder-radius:11px;\r\nborder:1px solid rgba(255,255,255,.15);\r\n}\r\n\r\n.scd-label{\r\nfont-size:10px;\r\nopacity:.75;\r\n}\r\n\r\n.scd-value{\r\nfont-size:18px;\r\nfont-weight:900;\r\nmargin-top:4px;\r\n}\r\n\r\n.scd-body{\r\nbackground:var(--bg);\r\npadding:15px;\r\n}\r\n\r\n.scd-case{\r\nbackground:#fff;\r\nborder-left:6px solid var(--purple);\r\npadding:15px;\r\nborder-radius:11px;\r\nmargin-bottom:15px;\r\nbox-shadow:0 3px 12px rgba(0,0,0,.06);\r\n}\r\n\r\n.scd-case-title{\r\nfont-size:20px;\r\nfont-weight:900;\r\n}\r\n\r\n.scd-case-text{\r\nfont-size:13px;\r\ncolor:#555;\r\nline-height:1.6;\r\nmargin-top:5px;\r\n}\r\n\r\n.scd-grid{\r\ndisplay:grid;\r\ngrid-template-columns:1.45fr .85fr;\r\ngap:15px;\r\n}\r\n\r\n.scd-card{\r\nbackground:#fff;\r\nborder-radius:15px;\r\npadding:16px;\r\nbox-shadow:0 3px 12px rgba(0,0,0,.06);\r\n}\r\n\r\n.scd-card h3{\r\nmargin:0 0 12px;\r\nfont-size:18px;\r\n}\r\n\r\n.scd-chart-wrap{\r\nbackground:#11101b;\r\nborder-radius:12px;\r\npadding:8px;\r\n}\r\n\r\n#scd-chart{\r\nwidth:100%;\r\nheight:390px;\r\ndisplay:block;\r\ncursor:crosshair;\r\n}\r\n\r\n.scd-chart-info{\r\ndisplay:flex;\r\njustify-content:space-between;\r\ncolor:#ddd;\r\nfont-size:11px;\r\npadding:7px 4px 2px;\r\n}\r\n\r\n.scd-controls{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(4,1fr);\r\ngap:7px;\r\nmargin-top:10px;\r\n}\r\n\r\n.scd-control{\r\nborder:0;\r\npadding:10px;\r\nborder-radius:8px;\r\nbackground:#eeeaf9;\r\nfont-weight:800;\r\ncursor:pointer;\r\n}\r\n\r\n.scd-control:hover{\r\nbackground:#ddd5f8;\r\n}\r\n\r\n.scd-clues{\r\ndisplay:grid;\r\ngrid-template-columns:1fr;\r\ngap:9px;\r\n}\r\n\r\n.scd-clue{\r\nbackground:#f7f5fc;\r\nborder:1px solid #e5e0f1;\r\nborder-radius:10px;\r\npadding:12px;\r\ncursor:pointer;\r\ntransition:.2s;\r\n}\r\n\r\n.scd-clue:hover{\r\nborder-color:var(--purple);\r\ntransform:translateY(-2px);\r\n}\r\n\r\n.scd-icon{\r\nfont-size:24px;\r\n}\r\n\r\n.scd-clue-title{\r\nfont-weight:900;\r\nmargin-top:4px;\r\n}\r\n\r\n.scd-clue-text{\r\ndisplay:none;\r\nfont-size:12px;\r\nline-height:1.6;\r\ncolor:#555;\r\nmargin-top:7px;\r\npadding-top:7px;\r\nborder-top:1px solid #ddd;\r\n}\r\n\r\n.scd-pattern-box{\r\nmargin-top:12px;\r\nbackground:#f0ebff;\r\npadding:12px;\r\nborder-radius:10px;\r\nfont-size:12px;\r\nline-height:1.6;\r\n}\r\n\r\n.scd-decision{\r\nmargin-top:15px;\r\n}\r\n\r\n.scd-actions{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(3,1fr);\r\ngap:9px;\r\n}\r\n\r\n.scd-btn{\r\nborder:0;\r\npadding:14px 8px;\r\nborder-radius:9px;\r\ncolor:#fff;\r\nfont-weight:900;\r\ncursor:pointer;\r\n}\r\n\r\n.scd-buy{\r\nbackground:var(--green);\r\n}\r\n\r\n.scd-sell{\r\nbackground:var(--red);\r\n}\r\n\r\n.scd-wait{\r\nbackground:var(--blue);\r\n}\r\n\r\n.scd-reveal{\r\nbackground:var(--purple);\r\nwidth:100%;\r\nmargin-top:10px;\r\n}\r\n\r\n.scd-result{\r\ndisplay:none;\r\nbackground:#fff;\r\nborder:2px solid var(--purple);\r\npadding:18px;\r\nborder-radius:15px;\r\nmargin-top:15px;\r\n}\r\n\r\n.scd-result-title{\r\nfont-size:22px;\r\nfont-weight:900;\r\n}\r\n\r\n.scd-result-text{\r\nfont-size:13px;\r\nline-height:1.7;\r\nmargin-top:8px;\r\nwhite-space:pre-line;\r\n}\r\n\r\n.scd-points{\r\nfont-size:28px;\r\nfont-weight:900;\r\nmargin-top:10px;\r\n}\r\n\r\n.scd-next{\r\nwidth:100%;\r\nborder:0;\r\npadding:13px;\r\nmargin-top:12px;\r\nborder-radius:9px;\r\nbackground:var(--dark);\r\ncolor:#fff;\r\nfont-weight:900;\r\ncursor:pointer;\r\n}\r\n\r\n.scd-pattern-answer{\r\nmargin-top:12px;\r\npadding:12px;\r\nbackground:#fff7df;\r\nborder-radius:10px;\r\nfont-size:13px;\r\nfont-weight:700;\r\n}\r\n\r\n.scd-progress{\r\nheight:8px;\r\nbackground:#e8e4f1;\r\nborder-radius:20px;\r\nmargin-top:12px;\r\noverflow:hidden;\r\n}\r\n\r\n.scd-progress-fill{\r\nheight:100%;\r\nwidth:0;\r\nbackground:var(--purple);\r\ntransition:.3s;\r\n}\r\n\r\n.scd-note{\r\nmargin-top:15px;\r\nfont-size:11px;\r\ncolor:#777;\r\nline-height:1.6;\r\n}\r\n\r\n@media(max-width:850px){\r\n\r\n.scd-stats{\r\ngrid-template-columns:repeat(2,1fr);\r\n}\r\n\r\n.scd-grid{\r\ngrid-template-columns:1fr;\r\n}\r\n\r\n}\r\n\r\n@media(max-width:550px){\r\n\r\n.scd-title{\r\nfont-size:23px;\r\n}\r\n\r\n#scd-chart{\r\nheight:300px;\r\n}\r\n\r\n.scd-actions{\r\ngrid-template-columns:1fr;\r\n}\r\n\r\n.scd-controls{\r\ngrid-template-columns:repeat(2,1fr);\r\n}\r\n\r\n}\r\n<\/style>\r\n\r\n\r\n<div class=\"scd-head\">\r\n\r\n<div class=\"scd-title\">\r\n\ud83d\udd6f\ufe0f Candlestick Detective\r\n<\/div>\r\n\r\n<div class=\"scd-sub\">\r\nInvestigate the candle. Read the context. Solve the market mystery.\r\n<\/div>\r\n\r\n<div class=\"scd-stats\">\r\n\r\n<div class=\"scd-stat\">\r\n<div class=\"scd-label\">DETECTIVE SCORE<\/div>\r\n<div class=\"scd-value\" id=\"scd-score\">0<\/div>\r\n<\/div>\r\n\r\n<div class=\"scd-stat\">\r\n<div class=\"scd-label\">CASES<\/div>\r\n<div class=\"scd-value\" id=\"scd-cases\">0<\/div>\r\n<\/div>\r\n\r\n<div class=\"scd-stat\">\r\n<div class=\"scd-label\">ACCURACY<\/div>\r\n<div class=\"scd-value\" id=\"scd-accuracy\">0%<\/div>\r\n<\/div>\r\n\r\n<div class=\"scd-stat\">\r\n<div class=\"scd-label\">RANK<\/div>\r\n<div class=\"scd-value\" id=\"scd-rank\">Rookie<\/div>\r\n<\/div>\r\n\r\n<div class=\"scd-stat\">\r\n<div class=\"scd-label\">CASE<\/div>\r\n<div class=\"scd-value\" id=\"scd-number\">1 \/ 25<\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-body\">\r\n\r\n\r\n<div class=\"scd-case\">\r\n\r\n<div class=\"scd-case-title\" id=\"scd-case-title\">\r\nCase #001 \u2014 The Candle at Support\r\n<\/div>\r\n\r\n<div class=\"scd-case-text\" id=\"scd-case-text\">\r\nA stock has been falling for several sessions.\r\nA strange candle appears near a previous support area.\r\nThe market may be preparing for a change.\r\nInvestigate before making your decision.\r\n<\/div>\r\n\r\n<div class=\"scd-progress\">\r\n<div class=\"scd-progress-fill\" id=\"scd-progress\"><\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-grid\">\r\n\r\n\r\n<div class=\"scd-card\">\r\n\r\n<h3>\ud83d\udcca Candlestick Investigation<\/h3>\r\n\r\n<div class=\"scd-chart-wrap\">\r\n\r\n<canvas id=\"scd-chart\"><\/canvas>\r\n\r\n<div class=\"scd-chart-info\">\r\n\r\n<span id=\"scd-ohlc\">\r\nHover over a candle\r\n<\/span>\r\n\r\n<span>\r\nSIMULATED\r\n<\/span>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-controls\">\r\n\r\n<button class=\"scd-control\" id=\"scd-zoom-in\">\r\n\uff0b Zoom\r\n<\/button>\r\n\r\n<button class=\"scd-control\" id=\"scd-zoom-out\">\r\n\u2212 Zoom\r\n<\/button>\r\n\r\n<button class=\"scd-control\" id=\"scd-prev\">\r\n\u2190 Older\r\n<\/button>\r\n\r\n<button class=\"scd-control\" id=\"scd-reset\">\r\n\u21bb Reset\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-card\">\r\n\r\n<h3>\ud83d\udd0e Evidence Room<\/h3>\r\n\r\n<div class=\"scd-clues\">\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"trend\">\r\n\r\n<div class=\"scd-icon\">\ud83d\udcc8<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nTrend\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"candle\">\r\n\r\n<div class=\"scd-icon\">\ud83d\udd6f\ufe0f<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nCandle Shape\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"location\">\r\n\r\n<div class=\"scd-icon\">\ud83d\udccd<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nCandle Location\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"volume\">\r\n\r\n<div class=\"scd-icon\">\ud83d\udcca<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nVolume\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"confirmation\">\r\n\r\n<div class=\"scd-icon\">\ud83d\udd0d<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nConfirmation\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-clue\" data-key=\"risk\">\r\n\r\n<div class=\"scd-icon\">\u26a0\ufe0f<\/div>\r\n\r\n<div class=\"scd-clue-title\">\r\nRisk\r\n<\/div>\r\n\r\n<div class=\"scd-clue-text\"><\/div>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-pattern-box\">\r\n\r\n<strong>\ud83d\udd75\ufe0f Detective Rule<\/strong><br>\r\n\r\nNever identify a candlestick pattern from its shape alone.\r\nAlways investigate its <strong>trend + location + volume + confirmation<\/strong>.\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-card scd-decision\">\r\n\r\n<h3>\ud83c\udfaf What Does the Candle Tell You?<\/h3>\r\n\r\n<div style=\"font-size:13px;color:#666;margin-bottom:10px\">\r\nChoose the action you believe has the strongest technical setup.\r\n<\/div>\r\n\r\n<div class=\"scd-actions\">\r\n\r\n<button class=\"scd-btn scd-buy\" data-action=\"BUY\">\r\n\ud83d\udfe2 BUY\r\n<\/button>\r\n\r\n<button class=\"scd-btn scd-sell\" data-action=\"SELL\">\r\n\ud83d\udd34 SELL\r\n<\/button>\r\n\r\n<button class=\"scd-btn scd-wait\" data-action=\"WAIT\">\r\n\ud83d\udd35 WAIT\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n\r\n<button\r\nclass=\"scd-btn scd-reveal\"\r\nid=\"scd-reveal\">\r\n\u23e9 Reveal What Happened\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-result\" id=\"scd-result\">\r\n\r\n<div class=\"scd-result-title\" id=\"scd-result-title\">\r\nCase Solved\r\n<\/div>\r\n\r\n<div class=\"scd-result-text\" id=\"scd-result-text\"><\/div>\r\n\r\n<div class=\"scd-pattern-answer\" id=\"scd-pattern-answer\"><\/div>\r\n\r\n<div class=\"scd-points\" id=\"scd-points\"><\/div>\r\n\r\n<button class=\"scd-next\" id=\"scd-next\">\r\n\u27a1\ufe0f Next Investigation\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"scd-note\">\r\n\r\n<strong>Game disclaimer:<\/strong>\r\nCandlestick Detective uses fictional simulated market data.\r\nCandlestick patterns are probability-based technical-analysis concepts,\r\nnot guaranteed trading signals. This game is for educational entertainment\r\nand is not investment advice.\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<script>\r\n(function(){\r\n\r\n\"use strict\";\r\n\r\n\r\nconst cases=[\r\n\r\n{\r\ntitle:\"Case #001 \u2014 The Candle at Support\",\r\ntext:\"The stock has been falling for several sessions. A strange candle appears near a previous support area. The market may be preparing for a change. Investigate before making your decision.\",\r\npattern:\"Hammer\",\r\ncorrect:\"BUY\",\r\ntrend:\"Price has been moving lower with a series of declining candles.\",\r\ncandle:\"The latest candle has a small real body near the top and a long lower shadow.\",\r\nlocation:\"The candle appears near a previously tested support zone.\",\r\nvolume:\"Volume is higher than the recent average.\",\r\nconfirmation:\"A bullish close above the Hammer high would provide stronger confirmation.\",\r\nrisk:\"A Hammer can fail if support breaks immediately.\",\r\nmove:8.4\r\n},\r\n\r\n{\r\ntitle:\"Case #002 \u2014 The Hanging Man\",\r\ntext:\"The stock has rallied strongly. A candle with a long lower shadow appears near the recent high. Is the market becoming vulnerable?\",\r\npattern:\"Hanging Man\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The stock is in an established short-term uptrend.\",\r\ncandle:\"The candle has a small body and a long lower shadow after a strong advance.\",\r\nlocation:\"It appears near a recent resistance area.\",\r\nvolume:\"Volume is slightly above normal.\",\r\nconfirmation:\"A bearish candle following the Hanging Man would strengthen the reversal case.\",\r\nrisk:\"The pattern can fail if buyers immediately push price to new highs.\",\r\nmove:-3.2\r\n},\r\n\r\n{\r\ntitle:\"Case #003 \u2014 Shooting Star\",\r\ntext:\"Buyers pushed the stock sharply higher during the session, but they could not hold the high.\",\r\npattern:\"Shooting Star\",\r\ncorrect:\"SELL\",\r\ntrend:\"The stock has been rising strongly.\",\r\ncandle:\"The candle has a small body near the low and a long upper shadow.\",\r\nlocation:\"The candle forms close to resistance.\",\r\nvolume:\"Volume is elevated.\",\r\nconfirmation:\"A close below the Shooting Star low would provide bearish confirmation.\",\r\nrisk:\"The stock could continue higher if resistance is broken.\",\r\nmove:-7.6\r\n},\r\n\r\n{\r\ntitle:\"Case #004 \u2014 Inverted Hammer\",\r\ntext:\"After a prolonged decline, buyers suddenly push price higher before sellers pull it back.\",\r\npattern:\"Inverted Hammer\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The previous trend is clearly bearish.\",\r\ncandle:\"The candle has a small body near the bottom and a long upper shadow.\",\r\nlocation:\"The candle appears close to support.\",\r\nvolume:\"Volume is slightly higher than average.\",\r\nconfirmation:\"A strong bullish candle on the next session would provide confirmation.\",\r\nrisk:\"Without confirmation, the candle may simply represent another failed rally.\",\r\nmove:3.9\r\n},\r\n\r\n{\r\ntitle:\"Case #005 \u2014 The Perfect Doji\",\r\ntext:\"The market suddenly becomes indecisive after several sessions of movement.\",\r\npattern:\"Doji\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The stock has recently moved sideways.\",\r\ncandle:\"Open and close are almost identical.\",\r\nlocation:\"The Doji appears in the middle of a trading range.\",\r\nvolume:\"Volume remains average.\",\r\nconfirmation:\"A breakout from the range is needed for directional confirmation.\",\r\nrisk:\"A Doji alone does not tell you whether price will rise or fall.\",\r\nmove:1.1\r\n},\r\n\r\n{\r\ntitle:\"Case #006 \u2014 Dragonfly at Support\",\r\ntext:\"Sellers push price sharply lower, but buyers recover almost the entire decline before the close.\",\r\npattern:\"Dragonfly Doji\",\r\ncorrect:\"BUY\",\r\ntrend:\"The stock has recently been falling.\",\r\ncandle:\"The candle has a very long lower shadow and almost no upper shadow.\",\r\nlocation:\"It appears directly at an important support zone.\",\r\nvolume:\"Volume is significantly higher.\",\r\nconfirmation:\"A bullish follow-through candle would strengthen the setup.\",\r\nrisk:\"A support breakdown would invalidate the bullish idea.\",\r\nmove:9.2\r\n},\r\n\r\n{\r\ntitle:\"Case #007 \u2014 Gravestone at Resistance\",\r\ntext:\"Buyers take control early, but sellers completely reverse the move before the close.\",\r\npattern:\"Gravestone Doji\",\r\ncorrect:\"SELL\",\r\ntrend:\"The stock has rallied sharply.\",\r\ncandle:\"The candle has a long upper shadow with the open and close near the low.\",\r\nlocation:\"The candle forms near major resistance.\",\r\nvolume:\"Volume is high.\",\r\nconfirmation:\"A lower close on the next candle would strengthen the bearish signal.\",\r\nrisk:\"A breakout above resistance could invalidate the setup.\",\r\nmove:-8.1\r\n},\r\n\r\n{\r\ntitle:\"Case #008 \u2014 Spinning Top Mystery\",\r\ntext:\"Neither buyers nor sellers appear able to dominate the session.\",\r\npattern:\"Spinning Top\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The stock is moving sideways.\",\r\ncandle:\"The candle has a small body with upper and lower shadows.\",\r\nlocation:\"It forms in the middle of the current range.\",\r\nvolume:\"Volume is average.\",\r\nconfirmation:\"Wait for a breakout or breakdown.\",\r\nrisk:\"Trading direction without confirmation can create a false signal.\",\r\nmove:1.8\r\n},\r\n\r\n{\r\ntitle:\"Case #009 \u2014 Bullish Marubozu\",\r\ntext:\"A powerful green candle appears with almost no upper or lower shadow.\",\r\npattern:\"Bullish Marubozu\",\r\ncorrect:\"BUY\",\r\ntrend:\"The stock has just broken out of consolidation.\",\r\ncandle:\"The candle has a large bullish body with minimal shadows.\",\r\nlocation:\"It breaks above a previous resistance zone.\",\r\nvolume:\"Volume is significantly above average.\",\r\nconfirmation:\"Holding above resistance would strengthen the breakout.\",\r\nrisk:\"A failed breakout could turn the candle into an exhaustion move.\",\r\nmove:11.7\r\n},\r\n\r\n{\r\ntitle:\"Case #010 \u2014 Bearish Marubozu\",\r\ntext:\"A huge red candle overwhelms the previous sessions and breaks below support.\",\r\npattern:\"Bearish Marubozu\",\r\ncorrect:\"SELL\",\r\ntrend:\"The market was already showing weakness.\",\r\ncandle:\"A large bearish body forms with very small shadows.\",\r\nlocation:\"The candle breaks below support.\",\r\nvolume:\"Volume surges.\",\r\nconfirmation:\"A continuation below support would confirm weakness.\",\r\nrisk:\"A rapid recovery above support could create a bear trap.\",\r\nmove:-12.4\r\n},\r\n\r\n{\r\ntitle:\"Case #011 \u2014 The Pin Bar\",\r\ntext:\"Price briefly travels far beyond the recent range before being aggressively rejected.\",\r\npattern:\"Pin Bar\",\r\ncorrect:\"BUY\",\r\ntrend:\"The stock has been declining.\",\r\ncandle:\"A long lower wick shows strong rejection of lower prices.\",\r\nlocation:\"The pin bar forms near support.\",\r\nvolume:\"Volume increases during the rejection.\",\r\nconfirmation:\"A bullish close above the pin-bar high is preferred.\",\r\nrisk:\"The support zone must hold.\",\r\nmove:7.9\r\n},\r\n\r\n{\r\ntitle:\"Case #012 \u2014 Bullish Engulfing\",\r\ntext:\"A large bullish candle completely overwhelms the body of the previous bearish candle.\",\r\npattern:\"Bullish Engulfing\",\r\ncorrect:\"BUY\",\r\ntrend:\"The market has been declining.\",\r\ncandle:\"The current bullish candle completely engulfs the previous bearish body.\",\r\nlocation:\"The pattern appears near support.\",\r\nvolume:\"Volume increases sharply.\",\r\nconfirmation:\"Follow-through above the engulfing candle high strengthens the setup.\",\r\nrisk:\"Failure to hold support invalidates the bullish idea.\",\r\nmove:10.6\r\n},\r\n\r\n{\r\ntitle:\"Case #013 \u2014 Bearish Engulfing\",\r\ntext:\"After a strong rally, sellers suddenly produce a candle larger than the previous bullish candle.\",\r\npattern:\"Bearish Engulfing\",\r\ncorrect:\"SELL\",\r\ntrend:\"The market is in an uptrend.\",\r\ncandle:\"A bearish candle completely engulfs the previous bullish body.\",\r\nlocation:\"The pattern forms near resistance.\",\r\nvolume:\"Volume spikes.\",\r\nconfirmation:\"A break below the engulfing candle low strengthens the signal.\",\r\nrisk:\"Strong buyers may invalidate the pattern.\",\r\nmove:-9.4\r\n},\r\n\r\n{\r\ntitle:\"Case #014 \u2014 Bullish Harami\",\r\ntext:\"A large bearish candle is followed by a small candle contained within its body.\",\r\npattern:\"Bullish Harami\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The stock is in a downtrend.\",\r\ncandle:\"The second candle is small and contained within the previous large bearish body.\",\r\nlocation:\"The pattern appears near support.\",\r\nvolume:\"Volume remains moderate.\",\r\nconfirmation:\"A bullish breakout from the small candle would provide confirmation.\",\r\nrisk:\"Without confirmation, the downtrend can continue.\",\r\nmove:4.1\r\n},\r\n\r\n{\r\ntitle:\"Case #015 \u2014 Bearish Harami\",\r\ntext:\"A small candle appears inside the body of a large bullish candle after a strong rally.\",\r\npattern:\"Bearish Harami\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The stock has been rising.\",\r\ncandle:\"The second candle has a small body contained within the previous bullish candle.\",\r\nlocation:\"It forms near resistance.\",\r\nvolume:\"Volume begins to decline.\",\r\nconfirmation:\"A bearish break would confirm weakness.\",\r\nrisk:\"The uptrend can continue without confirmation.\",\r\nmove:-3.7\r\n},\r\n\r\n{\r\ntitle:\"Case #016 \u2014 Morning Star\",\r\ntext:\"After a prolonged decline, a three-candle sequence suggests sellers may be losing control.\",\r\npattern:\"Morning Star\",\r\ncorrect:\"BUY\",\r\ntrend:\"The stock has been falling.\",\r\ncandle:\"A large bearish candle is followed by a small candle and then a strong bullish candle.\",\r\nlocation:\"The formation appears close to support.\",\r\nvolume:\"Volume expands on the bullish confirmation candle.\",\r\nconfirmation:\"The third candle closes deeply into the first candle's body.\",\r\nrisk:\"A return below the pattern low weakens the setup.\",\r\nmove:12.8\r\n},\r\n\r\n{\r\ntitle:\"Case #017 \u2014 Evening Star\",\r\ntext:\"After a strong rally, a three-candle sequence warns that buyers may be exhausted.\",\r\npattern:\"Evening Star\",\r\ncorrect:\"SELL\",\r\ntrend:\"The stock has been rising.\",\r\ncandle:\"A large bullish candle is followed by indecision and then a strong bearish candle.\",\r\nlocation:\"The pattern forms near resistance.\",\r\nvolume:\"Volume increases during the reversal.\",\r\nconfirmation:\"The third candle closes deeply into the first candle.\",\r\nrisk:\"A breakout above the pattern high invalidates the bearish setup.\",\r\nmove:-11.2\r\n},\r\n\r\n{\r\ntitle:\"Case #018 \u2014 Three White Soldiers\",\r\ntext:\"Three consecutive strong bullish candles appear after a prolonged decline.\",\r\npattern:\"Three White Soldiers\",\r\ncorrect:\"BUY\",\r\ntrend:\"The previous trend is bearish.\",\r\ncandle:\"Three strong bullish candles close progressively higher.\",\r\nlocation:\"The move starts close to long-term support.\",\r\nvolume:\"Volume gradually increases.\",\r\nconfirmation:\"Each candle maintains the bullish sequence.\",\r\nrisk:\"A very extended move may eventually need consolidation.\",\r\nmove:14.2\r\n},\r\n\r\n{\r\ntitle:\"Case #019 \u2014 Three Black Crows\",\r\ntext:\"Three consecutive bearish candles appear after a strong rally.\",\r\npattern:\"Three Black Crows\",\r\ncorrect:\"SELL\",\r\ntrend:\"The stock was previously rising.\",\r\ncandle:\"Three strong bearish candles close progressively lower.\",\r\nlocation:\"The pattern begins near resistance.\",\r\nvolume:\"Selling volume increases.\",\r\nconfirmation:\"Continued weakness below the third candle supports the setup.\",\r\nrisk:\"A sudden recovery can create a failed reversal.\",\r\nmove:-13.6\r\n},\r\n\r\n{\r\ntitle:\"Case #020 \u2014 Tweezer Bottom\",\r\ntext:\"Two candles test almost exactly the same low before buyers step in.\",\r\npattern:\"Tweezer Bottom\",\r\ncorrect:\"BUY\",\r\ntrend:\"The stock is declining.\",\r\ncandle:\"Two candles form matching or nearly matching lows.\",\r\nlocation:\"The lows occur at a visible support area.\",\r\nvolume:\"Buying volume increases on the second candle.\",\r\nconfirmation:\"A bullish close above the second candle strengthens the setup.\",\r\nrisk:\"Breaking below the matched lows invalidates the idea.\",\r\nmove:7.3\r\n},\r\n\r\n{\r\ntitle:\"Case #021 \u2014 Tweezer Top\",\r\ntext:\"Two candles test almost exactly the same high before sellers appear.\",\r\npattern:\"Tweezer Top\",\r\ncorrect:\"SELL\",\r\ntrend:\"The stock is rising.\",\r\ncandle:\"Two candles form matching or nearly matching highs.\",\r\nlocation:\"The highs occur near resistance.\",\r\nvolume:\"Selling volume increases.\",\r\nconfirmation:\"A break below the second candle strengthens the signal.\",\r\nrisk:\"A breakout above the matched highs invalidates the setup.\",\r\nmove:-6.8\r\n},\r\n\r\n{\r\ntitle:\"Case #022 \u2014 Long-Wick Rejection\",\r\ntext:\"The market explores a much lower price but buyers aggressively reject the move.\",\r\npattern:\"Long-Wick Rejection\",\r\ncorrect:\"BUY\",\r\ntrend:\"Price has recently been falling.\",\r\ncandle:\"A long lower wick shows rejection of lower prices.\",\r\nlocation:\"The rejection occurs near support.\",\r\nvolume:\"Volume is above normal.\",\r\nconfirmation:\"The next candle closes above the rejection candle high.\",\r\nrisk:\"Repeated tests of support can eventually cause a breakdown.\",\r\nmove:8.9\r\n},\r\n\r\n{\r\ntitle:\"Case #023 \u2014 Wide-Range Candle\",\r\ntext:\"A huge candle suddenly expands the daily trading range.\",\r\npattern:\"Wide-Range Candle\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The previous trend is unclear.\",\r\ncandle:\"The candle's range is much larger than recent candles.\",\r\nlocation:\"It appears near a major decision zone.\",\r\nvolume:\"Volume is extremely high.\",\r\nconfirmation:\"Wait for the next candle to show whether the move is continuation or exhaustion.\",\r\nrisk:\"High volatility can produce both large gains and losses.\",\r\nmove:2.6\r\n},\r\n\r\n{\r\ntitle:\"Case #024 \u2014 Gap Candle\",\r\ntext:\"The stock opens significantly away from the previous session's closing price.\",\r\npattern:\"Gap Candle\",\r\ncorrect:\"WAIT\",\r\ntrend:\"The market has been volatile.\",\r\ncandle:\"A clear gap separates today's opening from yesterday's close.\",\r\nlocation:\"The gap appears near a previous resistance zone.\",\r\nvolume:\"Opening volume is unusually high.\",\r\nconfirmation:\"Observe whether the gap holds or gets filled.\",\r\nrisk:\"Gap behaviour can change quickly after the opening.\",\r\nmove:-2.2\r\n},\r\n\r\n{\r\ntitle:\"Case #025 \u2014 The Mystery Candle\",\r\ntext:\"Everything looks ordinary until the final candle suddenly changes the character of the chart. You must interpret the entire context.\",\r\npattern:\"Contextual Rejection Candle\",\r\ncorrect:\"WAIT\",\r\ntrend:\"Price has moved sideways after a previous trend.\",\r\ncandle:\"The final candle shows a pronounced rejection wick.\",\r\nlocation:\"It is close to a key decision zone.\",\r\nvolume:\"Volume is higher than average.\",\r\nconfirmation:\"A directional break on the next candle is required.\",\r\nrisk:\"Without confirmation, the candle has limited predictive value.\",\r\nmove:1.7\r\n}\r\n\r\n];\r\n\r\n\r\nlet state={\r\nindex:0,\r\nscore:0,\r\nsolved:0,\r\ncorrect:0,\r\nzoom:1,\r\nrevealed:false,\r\ndecision:null\r\n};\r\n\r\n\r\nconst canvas=document.getElementById(\"scd-chart\");\r\nconst ctx=canvas.getContext(\"2d\");\r\n\r\nlet chartData=[];\r\nlet futureData=[];\r\nlet visible=36;\r\n\r\n\r\nfunction resize(){\r\n\r\nlet r=canvas.getBoundingClientRect();\r\n\r\ncanvas.width=r.width*2;\r\ncanvas.height=r.height*2;\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction generate(c){\r\n\r\nchartData=[];\r\nfutureData=[];\r\n\r\nlet price=100;\r\n\r\nlet direction=0;\r\n\r\nif(\r\nc.pattern===\"Hammer\" ||\r\nc.pattern===\"Inverted Hammer\" ||\r\nc.pattern===\"Bullish Engulfing\" ||\r\nc.pattern===\"Morning Star\" ||\r\nc.pattern===\"Three White Soldiers\" ||\r\nc.pattern===\"Tweezer Bottom\" ||\r\nc.pattern===\"Dragonfly Doji\" ||\r\nc.pattern===\"Long-Wick Rejection\" ||\r\nc.pattern===\"Pin Bar\"\r\n){\r\ndirection=-.7;\r\n}\r\n\r\nelse if(\r\nc.pattern===\"Shooting Star\" ||\r\nc.pattern===\"Hanging Man\" ||\r\nc.pattern===\"Bearish Engulfing\" ||\r\nc.pattern===\"Evening Star\" ||\r\nc.pattern===\"Three Black Crows\" ||\r\nc.pattern===\"Tweezer Top\" ||\r\nc.pattern===\"Gravestone Doji\"\r\n){\r\ndirection=.7;\r\n}\r\n\r\n\r\nfor(let i=0;i<34;i++){\r\n\r\nlet open=price;\r\n\r\nlet move=\r\ndirection+\r\n(Math.random()-.5)*3;\r\n\r\nlet close=open+move;\r\n\r\nlet high=Math.max(open,close)+Math.random()*2.2;\r\nlet low=Math.min(open,close)-Math.random()*2.2;\r\n\r\nchartData.push({\r\nopen,\r\nhigh,\r\nlow,\r\nclose,\r\nvolume:100+Math.random()*80\r\n});\r\n\r\nprice=close;\r\n\r\n}\r\n\r\n\r\n\/* Pattern-specific final candles *\/\r\n\r\nlet last=chartData[chartData.length-1];\r\n\r\n\r\nif(c.pattern===\"Hammer\"){\r\n\r\nlast.open=101;\r\nlast.close=103;\r\nlast.high=104;\r\nlast.low=92;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Hanging Man\"){\r\n\r\nlast.open=103;\r\nlast.close=104;\r\nlast.high=105;\r\nlast.low=95;\r\nlast.volume=180;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Shooting Star\"){\r\n\r\nlast.open=103;\r\nlast.close=102.5;\r\nlast.high=113;\r\nlast.low=101;\r\nlast.volume=200;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Inverted Hammer\"){\r\n\r\nlast.open=98;\r\nlast.close=98.5;\r\nlast.high=108;\r\nlast.low=97;\r\nlast.volume=170;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Doji\"){\r\n\r\nlast.open=100;\r\nlast.close=100.1;\r\nlast.high=105;\r\nlast.low=95;\r\nlast.volume=110;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Dragonfly Doji\"){\r\n\r\nlast.open=100;\r\nlast.close=100;\r\nlast.high=101;\r\nlast.low=90;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Gravestone Doji\"){\r\n\r\nlast.open=100;\r\nlast.close=100;\r\nlast.high=111;\r\nlast.low=99;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Spinning Top\"){\r\n\r\nlast.open=99;\r\nlast.close=101;\r\nlast.high=105;\r\nlast.low=95;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bullish Marubozu\"){\r\n\r\nlast.open=95;\r\nlast.close=108;\r\nlast.high=108.5;\r\nlast.low=94.5;\r\nlast.volume=230;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bearish Marubozu\"){\r\n\r\nlast.open=108;\r\nlast.close=94;\r\nlast.high=108.5;\r\nlast.low=93.5;\r\nlast.volume=230;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Pin Bar\" ||\r\nc.pattern===\"Long-Wick Rejection\"){\r\n\r\nlast.open=100;\r\nlast.close=103;\r\nlast.high=104;\r\nlast.low=91;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bullish Engulfing\"){\r\n\r\nlet p=chartData[chartData.length-2];\r\n\r\np.open=103;\r\np.close=98;\r\np.high=104;\r\np.low=96;\r\n\r\nlast.open=97;\r\nlast.close=106;\r\nlast.high=108;\r\nlast.low=95;\r\nlast.volume=220;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bearish Engulfing\"){\r\n\r\nlet p=chartData[chartData.length-2];\r\n\r\np.open=98;\r\np.close=104;\r\np.high=106;\r\np.low=97;\r\n\r\nlast.open=105;\r\nlast.close=96;\r\nlast.high=107;\r\nlast.low=94;\r\nlast.volume=220;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bullish Harami\"){\r\n\r\nlet p=chartData[chartData.length-2];\r\n\r\np.open=106;\r\np.close=96;\r\n\r\nlast.open=99;\r\nlast.close=101;\r\nlast.high=102;\r\nlast.low=98;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Bearish Harami\"){\r\n\r\nlet p=chartData[chartData.length-2];\r\n\r\np.open=96;\r\np.close=106;\r\n\r\nlast.open=101;\r\nlast.close=99;\r\nlast.high=102;\r\nlast.low=98;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Morning Star\"){\r\n\r\nlet a=chartData.length-3;\r\nlet b=chartData.length-2;\r\nlet d=chartData.length-1;\r\n\r\nchartData[a]={\r\nopen:106,\r\nclose:97,\r\nhigh:108,\r\nlow:95,\r\nvolume:170\r\n};\r\n\r\nchartData[b]={\r\nopen:97,\r\nclose:97.5,\r\nhigh:99,\r\nlow:96,\r\nvolume:120\r\n};\r\n\r\nchartData[d]={\r\nopen:98,\r\nclose:108,\r\nhigh:110,\r\nlow:97,\r\nvolume:230\r\n};\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Evening Star\"){\r\n\r\nlet a=chartData.length-3;\r\nlet b=chartData.length-2;\r\nlet d=chartData.length-1;\r\n\r\nchartData[a]={\r\nopen:97,\r\nclose:106,\r\nhigh:108,\r\nlow:96,\r\nvolume:170\r\n};\r\n\r\nchartData[b]={\r\nopen:106,\r\nclose:106.5,\r\nhigh:108,\r\nlow:105,\r\nvolume:120\r\n};\r\n\r\nchartData[d]={\r\nopen:105,\r\nclose:95,\r\nhigh:106,\r\nlow:93,\r\nvolume:230\r\n};\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Three White Soldiers\"){\r\n\r\nfor(let j=0;j<3;j++){\r\n\r\nlet i=chartData.length-3+j;\r\n\r\nchartData[i]={\r\nopen:95+j*4,\r\nclose:100+j*4,\r\nhigh:101+j*4,\r\nlow:94+j*4,\r\nvolume:180+j*20\r\n};\r\n\r\n}\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Three Black Crows\"){\r\n\r\nfor(let j=0;j<3;j++){\r\n\r\nlet i=chartData.length-3+j;\r\n\r\nchartData[i]={\r\nopen:108-j*4,\r\nclose:103-j*4,\r\nhigh:109-j*4,\r\nlow:102-j*4,\r\nvolume:180+j*20\r\n};\r\n\r\n}\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Tweezer Bottom\"){\r\n\r\nchartData[chartData.length-2]={\r\nopen:102,\r\nclose:98,\r\nhigh:104,\r\nlow:94,\r\nvolume:130\r\n};\r\n\r\nlast.open=98;\r\nlast.close=103;\r\nlast.high=105;\r\nlast.low=94;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Tweezer Top\"){\r\n\r\nchartData[chartData.length-2]={\r\nopen:98,\r\nclose:104,\r\nhigh:108,\r\nlow:97,\r\nvolume:130\r\n};\r\n\r\nlast.open=104;\r\nlast.close=99;\r\nlast.high=108;\r\nlast.low=97;\r\nlast.volume=210;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Gap Candle\"){\r\n\r\nlet previous=chartData[chartData.length-2];\r\n\r\nprevious.close=100;\r\n\r\nlast.open=110;\r\nlast.close=113;\r\nlast.high=115;\r\nlast.low=109;\r\nlast.volume=220;\r\n\r\n}\r\n\r\n\r\nif(c.pattern===\"Wide-Range Candle\"){\r\n\r\nlast.open=110;\r\nlast.close=96;\r\nlast.high=113;\r\nlast.low=91;\r\nlast.volume=260;\r\n\r\n}\r\n\r\n\r\n\/* Future *\/\r\n\r\nlet prev=chartData[chartData.length-1].close;\r\n\r\nlet dir=c.move>=0?1:-1;\r\n\r\nfor(let i=0;i<8;i++){\r\n\r\nlet open=prev;\r\n\r\nlet close=\r\nopen+\r\ndir*(1.8+Math.random()*2.5);\r\n\r\nfutureData.push({\r\nopen,\r\nclose,\r\nhigh:Math.max(open,close)+1.4,\r\nlow:Math.min(open,close)-1.4,\r\nvolume:130+Math.random()*70\r\n});\r\n\r\nprev=close;\r\n\r\n}\r\n\r\nvisible=34;\r\n\r\n}\r\n\r\n\r\nfunction draw(){\r\n\r\nif(!chartData.length)return;\r\n\r\nlet w=canvas.width;\r\nlet h=canvas.height;\r\n\r\nctx.clearRect(0,0,w,h);\r\n\r\nctx.strokeStyle=\"#272431\";\r\nctx.lineWidth=1;\r\n\r\nfor(let y=40;y<h;y+=50){\r\n\r\nctx.beginPath();\r\nctx.moveTo(0,y);\r\nctx.lineTo(w,y);\r\nctx.stroke();\r\n\r\n}\r\n\r\nfor(let x=0;x<w;x+=60){\r\n\r\nctx.beginPath();\r\nctx.moveTo(x,0);\r\nctx.lineTo(x,h);\r\nctx.stroke();\r\n\r\n}\r\n\r\n\r\nlet data=\r\nstate.revealed\r\n?chartData.concat(futureData)\r\n:chartData.slice(0,visible);\r\n\r\nlet max=Math.max(...data.map(x=>x.high))+3;\r\nlet min=Math.min(...data.map(x=>x.low))-3;\r\n\r\nlet range=max-min;\r\n\r\nlet cw=Math.max(5,(w\/data.length)*.55);\r\n\r\n\r\ndata.forEach((c,i)=>{\r\n\r\nlet x=(i+.5)*(w\/data.length);\r\n\r\nlet oy=h-((c.open-min)\/range)*(h-35)-15;\r\nlet cy=h-((c.close-min)\/range)*(h-35)-15;\r\nlet hy=h-((c.high-min)\/range)*(h-35)-15;\r\nlet ly=h-((c.low-min)\/range)*(h-35)-15;\r\n\r\nlet bull=c.close>=c.open;\r\n\r\nctx.strokeStyle=bull?\"#22c55e\":\"#ef4444\";\r\nctx.fillStyle=bull?\"#22c55e\":\"#ef4444\";\r\n\r\nctx.lineWidth=2;\r\n\r\nctx.beginPath();\r\nctx.moveTo(x,hy);\r\nctx.lineTo(x,ly);\r\nctx.stroke();\r\n\r\nlet top=Math.min(oy,cy);\r\nlet height=Math.max(2,Math.abs(cy-oy));\r\n\r\nctx.fillRect(\r\nx-cw\/2,\r\ntop,\r\ncw,\r\nheight\r\n);\r\n\r\n\r\nif(state.revealed && i>=chartData.length){\r\n\r\nctx.globalAlpha=.4;\r\nctx.fillStyle=\"#f59e0b\";\r\n\r\nctx.fillRect(\r\nx-cw\/2,\r\ntop,\r\ncw,\r\nheight\r\n);\r\n\r\nctx.globalAlpha=1;\r\n\r\n}\r\n\r\n});\r\n\r\n\r\nif(!state.revealed){\r\n\r\nlet i=data.length-1;\r\n\r\nlet x=(i+.5)*(w\/data.length);\r\n\r\nctx.strokeStyle=\"#f59e0b\";\r\nctx.setLineDash([7,5]);\r\n\r\nctx.beginPath();\r\nctx.moveTo(x,0);\r\nctx.lineTo(x,h);\r\nctx.stroke();\r\n\r\nctx.setLineDash([]);\r\n\r\n}\r\n\r\n}\r\n\r\n\r\nfunction clues(){\r\n\r\nlet c=cases[state.index];\r\n\r\nlet data={\r\ntrend:c.trend,\r\ncandle:c.candle,\r\nlocation:c.location,\r\nvolume:c.volume,\r\nconfirmation:c.confirmation,\r\nrisk:c.risk\r\n};\r\n\r\ndocument.querySelectorAll(\".scd-clue\").forEach(el=>{\r\n\r\nel.querySelector(\".scd-clue-text\").textContent=\r\ndata[el.dataset.key];\r\n\r\nel.querySelector(\".scd-clue-text\").style.display=\"none\";\r\n\r\n});\r\n\r\n}\r\n\r\n\r\nfunction load(){\r\n\r\nlet c=cases[state.index];\r\n\r\nstate.revealed=false;\r\nstate.decision=null;\r\n\r\ndocument.getElementById(\"scd-case-title\").textContent=\r\nc.title;\r\n\r\ndocument.getElementById(\"scd-case-text\").textContent=\r\nc.text;\r\n\r\ndocument.getElementById(\"scd-number\").textContent=\r\n(state.index+1)+\" \/ \"+cases.length;\r\n\r\ndocument.getElementById(\"scd-progress\").style.width=\r\n((state.index)\/cases.length*100)+\"%\";\r\n\r\ndocument.getElementById(\"scd-result\").style.display=\"none\";\r\n\r\ndocument.getElementById(\"scd-reveal\").textContent=\r\n\"\u23e9 Reveal What Happened\";\r\n\r\ngenerate(c);\r\n\r\nclues();\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction decide(action){\r\n\r\nif(state.decision)return;\r\n\r\nstate.decision=action;\r\n\r\nlet c=cases[state.index];\r\n\r\nlet points=action===c.correct?100:20;\r\n\r\nif(action===c.correct)\r\nstate.correct++;\r\n\r\nstate.solved++;\r\nstate.score+=points;\r\n\r\ndocument.getElementById(\"scd-score\").textContent=\r\nstate.score;\r\n\r\ndocument.getElementById(\"scd-cases\").textContent=\r\nstate.solved;\r\n\r\ndocument.getElementById(\"scd-accuracy\").textContent=\r\nMath.round(\r\nstate.correct\/state.solved*100\r\n)+\"%\";\r\n\r\n\r\nlet rank=\"Rookie\";\r\n\r\nif(state.score>=1800)\r\nrank=\"Candlestick Master\";\r\nelse if(state.score>=1200)\r\nrank=\"Pattern Detective\";\r\nelse if(state.score>=700)\r\nrank=\"Chart Analyst\";\r\nelse if(state.score>=300)\r\nrank=\"Junior Detective\";\r\n\r\ndocument.getElementById(\"scd-rank\").textContent=rank;\r\n\r\n\r\nlet title;\r\nlet text;\r\n\r\nif(action===c.correct){\r\n\r\ntitle=\"\ud83c\udfaf Excellent Detective Work!\";\r\n\r\ntext=\r\n\"You read the setup correctly.\\n\\n\"+\r\n\"The candle pattern was \"+c.pattern+\".\\n\\n\"+\r\n\"The simulated follow-through was \"+\r\n(c.move>=0?\"+\":\"\")+c.move+\"%.\";\r\n\r\n}else{\r\n\r\ntitle=\"\ud83d\udd75\ufe0f The Evidence Told a Different Story\";\r\n\r\ntext=\r\n\"Your decision was not the strongest interpretation of the setup.\\n\\n\"+\r\n\"The pattern was \"+c.pattern+\".\\n\\n\"+\r\n\"The simulated follow-through was \"+\r\n(c.move>=0?\"+\":\"\")+c.move+\"%.\";\r\n\r\n}\r\n\r\n\r\ndocument.getElementById(\"scd-result-title\").textContent=title;\r\n\r\ndocument.getElementById(\"scd-result-text\").textContent=text;\r\n\r\ndocument.getElementById(\"scd-pattern-answer\").textContent=\r\n\"\ud83d\udd6f\ufe0f Pattern: \"+c.pattern+\r\n\" | Best Game Decision: \"+c.correct;\r\n\r\ndocument.getElementById(\"scd-points\").textContent=\r\n\"+\"+points+\" Detective Points\";\r\n\r\ndocument.getElementById(\"scd-result\").style.display=\"block\";\r\n\r\n}\r\n\r\n\r\nfunction reveal(){\r\n\r\nif(state.revealed)return;\r\n\r\nstate.revealed=true;\r\n\r\ndraw();\r\n\r\ndocument.getElementById(\"scd-reveal\").textContent=\r\n\"\u2705 Follow-Through Revealed\";\r\n\r\n}\r\n\r\n\r\nfunction zoomIn(){\r\n\r\nvisible=Math.max(18,visible-5);\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction zoomOut(){\r\n\r\nvisible=Math.min(34,visible+5);\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction older(){\r\n\r\nvisible=Math.max(15,visible-3);\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction resetChart(){\r\n\r\nvisible=34;\r\n\r\nstate.revealed=false;\r\n\r\ndocument.getElementById(\"scd-reveal\").textContent=\r\n\"\u23e9 Reveal What Happened\";\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\ndocument.querySelectorAll(\".scd-clue\").forEach(el=>{\r\n\r\nel.addEventListener(\"click\",function(){\r\n\r\nlet box=this.querySelector(\".scd-clue-text\");\r\n\r\nbox.style.display=\r\nbox.style.display===\"block\"\r\n?\"none\"\r\n:\"block\";\r\n\r\n});\r\n\r\n});\r\n\r\n\r\ndocument.querySelectorAll(\"[data-action]\").forEach(btn=>{\r\n\r\nbtn.addEventListener(\"click\",function(){\r\n\r\ndecide(this.dataset.action);\r\n\r\n});\r\n\r\n});\r\n\r\n\r\ndocument.getElementById(\"scd-reveal\")\r\n.addEventListener(\"click\",reveal);\r\n\r\n\r\ndocument.getElementById(\"scd-zoom-in\")\r\n.addEventListener(\"click\",zoomIn);\r\n\r\n\r\ndocument.getElementById(\"scd-zoom-out\")\r\n.addEventListener(\"click\",zoomOut);\r\n\r\n\r\ndocument.getElementById(\"scd-prev\")\r\n.addEventListener(\"click\",older);\r\n\r\n\r\ndocument.getElementById(\"scd-reset\")\r\n.addEventListener(\"click\",resetChart);\r\n\r\n\r\ndocument.getElementById(\"scd-next\")\r\n.addEventListener(\"click\",function(){\r\n\r\nstate.index++;\r\n\r\nif(state.index>=cases.length){\r\n\r\nstate.index=0;\r\n\r\nalert(\r\n\"\ud83c\udfc6 Candlestick Detective Complete!\\n\\n\"+\r\n\"Score: \"+state.score+\r\n\"\\nAccuracy: \"+\r\nMath.round(state.correct\/state.solved*100)+\r\n\"%\"\r\n);\r\n\r\n}\r\n\r\nload();\r\n\r\n});\r\n\r\n\r\ncanvas.addEventListener(\"mousemove\",function(e){\r\n\r\nlet rect=canvas.getBoundingClientRect();\r\n\r\nlet x=\r\n(e.clientX-rect.left)*\r\n(canvas.width\/rect.width);\r\n\r\nlet data=\r\nstate.revealed\r\n?chartData.concat(futureData)\r\n:chartData.slice(0,visible);\r\n\r\nlet index=\r\nMath.floor(\r\nx\/(canvas.width\/data.length)\r\n);\r\n\r\nif(index<0 || index>=data.length)return;\r\n\r\nlet c=data[index];\r\n\r\ndocument.getElementById(\"scd-ohlc\").textContent=\r\n\"O \"+c.open.toFixed(2)+\r\n\"  H \"+c.high.toFixed(2)+\r\n\"  L \"+c.low.toFixed(2)+\r\n\"  C \"+c.close.toFixed(2);\r\n\r\n});\r\n\r\n\r\nwindow.addEventListener(\"resize\",resize);\r\n\r\n\r\nload();\r\n\r\nsetTimeout(resize,100);\r\n\r\n})();\r\n<\/script>\r\n\r\n<\/div>\n<h1>\ud83d\udd6f\ufe0f Candlestick Detective \u2013 Interactive <a href=\"https:\/\/www.stockmaster.in\/stock-market-comics\/category\/technical-analysis\/\">Technical Analysis<\/a> Game<\/h1>\n<p style=\"text-align: justify;\">Welcome to <strong>Candlestick Detective<\/strong>, an interactive stock market game from <a href=\"https:\/\/www.stockmaster.in\/universe\/\"><strong>StockMaster Universe<\/strong><\/a> where you investigate candlestick patterns and make simulated trading decisions. Instead of answering traditional quiz questions, you become a market detective and analyse a live-style simulated candlestick chart to uncover what the price action may be telling you.<\/p>\n<p style=\"text-align: justify;\">Your investigation begins with a mystery chart. You will examine the <strong>trend, candle shape, candle location, trading volume, confirmation signals and potential risks<\/strong> before making your decision. Choose whether the setup suggests <strong>BUY, SELL or WAIT<\/strong>, then reveal the next simulated candles to see how the market scenario develops.<\/p>\n<p style=\"text-align: justify;\">The game features a wide range of popular candlestick formations, including <strong>Hammer, Hanging Man, Shooting Star, Inverted Hammer, <a href=\"https:\/\/www.stockmaster.in\/stock-market-comics\/chart-mission-11-doji-the-indecision-candle\/\">Doji<\/a>, Dragonfly Doji, Gravestone Doji, Spinning Top, Bullish Marubozu, Bearish Marubozu, Pin Bar, Bullish Engulfing, Bearish Engulfing, Harami, Morning Star, Evening Star, Three White Soldiers, Three Black Crows, Tweezer Bottom and Tweezer Top<\/strong>.<\/p>\n<p style=\"text-align: justify;\">Candlestick Detective is designed to teach an important principle of technical analysis: <strong>a <a href=\"https:\/\/www.stockmaster.in\/stock-market-comics\/chart-mission-4-anatomy-of-a-candlestick\/\">candlestick pattern<\/a> should not be analysed in isolation<\/strong>. The same candle can have a completely different meaning depending on the prevailing trend, support and resistance levels, volume and confirmation.<\/p>\n<p style=\"text-align: justify;\">As you solve cases, you earn <strong>Detective Points<\/strong>, improve your accuracy and progress through different detective ranks. Each case is built around simulated market data, making the experience educational, interactive and engaging without using real money.<\/p>\n<p style=\"text-align: justify;\">Whether you are learning candlestick patterns for the first time or want to improve your technical analysis skills, <strong>Candlestick Detective<\/strong> provides a practical way to study price action through gameplay.<\/p>\n<p style=\"text-align: justify;\">Explore the chart, investigate the clues, make your decision and discover what happened next.<\/p>\n<p style=\"text-align: justify;\"><strong>Can you become the Candlestick Master?<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd6f\ufe0f Candlestick Detective \u2013 Interactive Technical Analysis Game Welcome to Candlestick Detective, an interactive stock market game from StockMaster Universe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"elementor_theme","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[77],"tags":[],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-technical-analysis-games"],"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"StockMaster Universe","author_link":"https:\/\/www.stockmaster.in\/universe\/author\/unistockadmin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/www.stockmaster.in\/universe\/category\/stock-market-games\/technical-analysis-games\/\" rel=\"category tag\">Technical Analysis Games<\/a>","rttpg_excerpt":"\ud83d\udd6f\ufe0f Candlestick Detective \u2013 Interactive Technical Analysis Game Welcome to Candlestick Detective, an interactive stock market game from StockMaster Universe [&hellip;]","_links":{"self":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":0,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}