{"id":546,"date":"2026-08-10T15:20:37","date_gmt":"2026-08-10T15:20:37","guid":{"rendered":"https:\/\/www.stockmaster.in\/universe\/?p=546"},"modified":"2026-08-10T15:26:13","modified_gmt":"2026-08-10T15:26:13","slug":"volatility-bollinger-games","status":"publish","type":"post","link":"https:\/\/www.stockmaster.in\/universe\/volatility-bollinger-games\/","title":{"rendered":"Volatility &#038; Bollinger Games"},"content":{"rendered":"<div id=\"sm-volatility-detective\">\r\n\r\n<style>\r\n#sm-volatility-detective{\r\n--purple:#6d3df5;\r\n--dark:#171329;\r\n--bg:#f5f3fb;\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#sm-volatility-detective *{box-sizing:border-box}\r\n\r\n.vbd-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.vbd-title{\r\nfont-size:29px;\r\nfont-weight:900;\r\n}\r\n\r\n.vbd-sub{\r\nfont-size:13px;\r\nopacity:.85;\r\nmargin-top:5px;\r\n}\r\n\r\n.vbd-stats{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(5,1fr);\r\ngap:10px;\r\nmargin-top:18px;\r\n}\r\n\r\n.vbd-stat{\r\nbackground:rgba(255,255,255,.12);\r\npadding:11px;\r\nborder-radius:11px;\r\n}\r\n\r\n.vbd-label{\r\nfont-size:10px;\r\nopacity:.75;\r\n}\r\n\r\n.vbd-value{\r\nfont-size:18px;\r\nfont-weight:900;\r\nmargin-top:4px;\r\n}\r\n\r\n.vbd-body{\r\nbackground:var(--bg);\r\npadding:15px;\r\n}\r\n\r\n.vbd-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.vbd-case-title{\r\nfont-size:20px;\r\nfont-weight:900;\r\n}\r\n\r\n.vbd-case-text{\r\nfont-size:13px;\r\ncolor:#555;\r\nline-height:1.6;\r\nmargin-top:5px;\r\n}\r\n\r\n.vbd-progress{\r\nheight:8px;\r\nbackground:#e8e4f1;\r\nborder-radius:20px;\r\nmargin-top:12px;\r\noverflow:hidden;\r\n}\r\n\r\n.vbd-progress-fill{\r\nheight:100%;\r\nwidth:0;\r\nbackground:var(--purple);\r\ntransition:.3s;\r\n}\r\n\r\n.vbd-grid{\r\ndisplay:grid;\r\ngrid-template-columns:1.45fr .85fr;\r\ngap:15px;\r\n}\r\n\r\n.vbd-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.vbd-card h3{\r\nmargin:0 0 12px;\r\nfont-size:18px;\r\n}\r\n\r\n.vbd-chart-wrap{\r\nbackground:#11101b;\r\nborder-radius:12px;\r\npadding:8px;\r\n}\r\n\r\n#vbd-chart{\r\nwidth:100%;\r\nheight:390px;\r\ndisplay:block;\r\ncursor:crosshair;\r\n}\r\n\r\n.vbd-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.vbd-controls{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(4,1fr);\r\ngap:7px;\r\nmargin-top:10px;\r\n}\r\n\r\n.vbd-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.vbd-clues{\r\ndisplay:grid;\r\ngrid-template-columns:1fr;\r\ngap:9px;\r\n}\r\n\r\n.vbd-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.vbd-clue:hover{\r\nborder-color:var(--purple);\r\ntransform:translateY(-2px);\r\n}\r\n\r\n.vbd-icon{\r\nfont-size:24px;\r\n}\r\n\r\n.vbd-clue-title{\r\nfont-weight:900;\r\nmargin-top:4px;\r\n}\r\n\r\n.vbd-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.vbd-indicator-box{\r\nmargin-top:12px;\r\nbackground:#f0ebff;\r\npadding:12px;\r\nborder-radius:10px;\r\nfont-size:12px;\r\nline-height:1.7;\r\n}\r\n\r\n.vbd-decision{\r\nmargin-top:15px;\r\n}\r\n\r\n.vbd-actions{\r\ndisplay:grid;\r\ngrid-template-columns:repeat(3,1fr);\r\ngap:9px;\r\n}\r\n\r\n.vbd-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.vbd-buy{background:var(--green)}\r\n.vbd-sell{background:var(--red)}\r\n.vbd-wait{background:var(--blue)}\r\n\r\n.vbd-reveal{\r\nbackground:var(--purple);\r\nwidth:100%;\r\nmargin-top:10px;\r\n}\r\n\r\n.vbd-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.vbd-result-title{\r\nfont-size:22px;\r\nfont-weight:900;\r\n}\r\n\r\n.vbd-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.vbd-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.vbd-points{\r\nfont-size:28px;\r\nfont-weight:900;\r\nmargin-top:10px;\r\n}\r\n\r\n.vbd-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.vbd-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.vbd-stats{\r\ngrid-template-columns:repeat(2,1fr);\r\n}\r\n\r\n.vbd-grid{\r\ngrid-template-columns:1fr;\r\n}\r\n\r\n}\r\n\r\n@media(max-width:550px){\r\n\r\n.vbd-title{\r\nfont-size:23px;\r\n}\r\n\r\n#vbd-chart{\r\nheight:300px;\r\n}\r\n\r\n.vbd-actions{\r\ngrid-template-columns:1fr;\r\n}\r\n\r\n.vbd-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=\"vbd-head\">\r\n\r\n<div class=\"vbd-title\">\r\n\ud83c\udf2a\ufe0f Volatility & Bollinger Detective\r\n<\/div>\r\n\r\n<div class=\"vbd-sub\">\r\nInvestigate volatility \u2022 Read the bands \u2022 Find the market's next move\r\n<\/div>\r\n\r\n<div class=\"vbd-stats\">\r\n\r\n<div class=\"vbd-stat\">\r\n<div class=\"vbd-label\">DETECTIVE SCORE<\/div>\r\n<div class=\"vbd-value\" id=\"vbd-score\">0<\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-stat\">\r\n<div class=\"vbd-label\">CASES SOLVED<\/div>\r\n<div class=\"vbd-value\" id=\"vbd-cases\">0<\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-stat\">\r\n<div class=\"vbd-label\">ACCURACY<\/div>\r\n<div class=\"vbd-value\" id=\"vbd-accuracy\">0%<\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-stat\">\r\n<div class=\"vbd-label\">RANK<\/div>\r\n<div class=\"vbd-value\" id=\"vbd-rank\">Rookie<\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-stat\">\r\n<div class=\"vbd-label\">CASE<\/div>\r\n<div class=\"vbd-value\" id=\"vbd-number\">1 \/ 7<\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"vbd-body\">\r\n\r\n<div class=\"vbd-case\">\r\n\r\n<div class=\"vbd-case-title\" id=\"vbd-case-title\">\r\nCase #001 \u2014 The Squeeze Before the Storm\r\n<\/div>\r\n\r\n<div class=\"vbd-case-text\" id=\"vbd-case-text\">\r\nPrice has become unusually quiet. The Bollinger Bands are narrowing\r\nand volatility has compressed. Something may be about to happen.\r\nInvestigate the evidence.\r\n<\/div>\r\n\r\n<div class=\"vbd-progress\">\r\n<div class=\"vbd-progress-fill\" id=\"vbd-progress\"><\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"vbd-grid\">\r\n\r\n<div class=\"vbd-card\">\r\n\r\n<h3>\ud83d\udcca Volatility Investigation Chart<\/h3>\r\n\r\n<div class=\"vbd-chart-wrap\">\r\n\r\n<canvas id=\"vbd-chart\"><\/canvas>\r\n\r\n<div class=\"vbd-chart-info\">\r\n\r\n<span id=\"vbd-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=\"vbd-controls\">\r\n\r\n<button class=\"vbd-control\" id=\"vbd-zoom-in\">\r\n\uff0b Zoom\r\n<\/button>\r\n\r\n<button class=\"vbd-control\" id=\"vbd-zoom-out\">\r\n\u2212 Zoom\r\n<\/button>\r\n\r\n<button class=\"vbd-control\" id=\"vbd-bands\">\r\nBollinger Bands\r\n<\/button>\r\n\r\n<button class=\"vbd-control\" id=\"vbd-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=\"vbd-card\">\r\n\r\n<h3>\ud83d\udd0e Evidence Room<\/h3>\r\n\r\n<div class=\"vbd-clues\">\r\n\r\n<div class=\"vbd-clue\" data-key=\"volatility\">\r\n<div class=\"vbd-icon\">\ud83c\udf2a\ufe0f<\/div>\r\n<div class=\"vbd-clue-title\">Volatility<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-clue\" data-key=\"bands\">\r\n<div class=\"vbd-icon\">\u3030\ufe0f<\/div>\r\n<div class=\"vbd-clue-title\">Bollinger Bands<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-clue\" data-key=\"trend\">\r\n<div class=\"vbd-icon\">\ud83d\udcc8<\/div>\r\n<div class=\"vbd-clue-title\">Price Trend<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-clue\" data-key=\"volume\">\r\n<div class=\"vbd-icon\">\ud83d\udcca<\/div>\r\n<div class=\"vbd-clue-title\">Volume<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-clue\" data-key=\"atr\">\r\n<div class=\"vbd-icon\">\ud83d\udccf<\/div>\r\n<div class=\"vbd-clue-title\">ATR Clue<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<div class=\"vbd-clue\" data-key=\"risk\">\r\n<div class=\"vbd-icon\">\u26a0\ufe0f<\/div>\r\n<div class=\"vbd-clue-title\">Volatility Risk<\/div>\r\n<div class=\"vbd-clue-text\"><\/div>\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<div class=\"vbd-indicator-box\">\r\n\r\n<strong>\ud83c\udf2a\ufe0f Detective Rule<\/strong><br>\r\n\r\nLow volatility does not mean low risk forever.\r\nA period of compression can eventually be followed by\r\na large volatility expansion. Always investigate direction,\r\nvolume and confirmation before acting.\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"vbd-card vbd-decision\">\r\n\r\n<h3>\ud83c\udfaf Your Market Decision<\/h3>\r\n\r\n<div style=\"font-size:13px;color:#666;margin-bottom:10px\">\r\nWhat does the volatility setup suggest?\r\n<\/div>\r\n\r\n<div class=\"vbd-actions\">\r\n\r\n<button class=\"vbd-btn vbd-buy\" data-action=\"BUY\">\r\n\ud83d\udfe2 BUY\r\n<\/button>\r\n\r\n<button class=\"vbd-btn vbd-sell\" data-action=\"SELL\">\r\n\ud83d\udd34 SELL\r\n<\/button>\r\n\r\n<button class=\"vbd-btn vbd-wait\" data-action=\"WAIT\">\r\n\ud83d\udd35 WAIT\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n<button class=\"vbd-btn vbd-reveal\" id=\"vbd-reveal\">\r\n\u23e9 Reveal Volatility Move\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"vbd-result\" id=\"vbd-result\">\r\n\r\n<div class=\"vbd-result-title\" id=\"vbd-result-title\">\r\nCase Solved\r\n<\/div>\r\n\r\n<div class=\"vbd-result-text\" id=\"vbd-result-text\"><\/div>\r\n\r\n<div class=\"vbd-answer\" id=\"vbd-answer\"><\/div>\r\n\r\n<div class=\"vbd-points\" id=\"vbd-points\"><\/div>\r\n\r\n<button class=\"vbd-next\" id=\"vbd-next\">\r\n\u27a1\ufe0f Next Investigation\r\n<\/button>\r\n\r\n<\/div>\r\n\r\n\r\n<div class=\"vbd-note\">\r\n\r\n<strong>Game disclaimer:<\/strong>\r\nVolatility & Bollinger Detective uses fictional simulated market data.\r\nBollinger Bands, ATR and volatility measures are educational technical\r\nanalysis concepts and are not guaranteed trading signals. This game is\r\nfor education and entertainment and 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 Squeeze Before the Storm\",\r\ntext:\"Price has become unusually quiet. The Bollinger Bands are narrowing and volatility has compressed. Something may be about to happen. Investigate the evidence.\",\r\npattern:\"Bollinger Band Squeeze\",\r\ncorrect:\"WAIT\",\r\nvolatility:\"Volatility has fallen sharply and the recent trading range is unusually narrow.\",\r\nbands:\"The upper and lower Bollinger Bands are moving close together.\",\r\ntrend:\"Price is moving sideways with no confirmed breakout direction.\",\r\nvolume:\"Volume has declined during the compression.\",\r\natr:\"ATR is falling, confirming that the trading range has contracted.\",\r\nrisk:\"A squeeze can break in either direction. Predicting the direction too early is risky.\",\r\nmove:5.6\r\n},\r\n\r\n{\r\ntitle:\"Case #002 \u2014 Volatility Explosion\",\r\ntext:\"The quiet market suddenly produces a very large candle and the trading range expands rapidly.\",\r\npattern:\"Volatility Expansion\",\r\ncorrect:\"BUY\",\r\nvolatility:\"Volatility has increased sharply after a period of compression.\",\r\nbands:\"The Bollinger Bands are expanding quickly.\",\r\ntrend:\"Price has broken upward from the recent consolidation.\",\r\nvolume:\"Volume has increased significantly.\",\r\natr:\"ATR is rising rapidly as the daily range expands.\",\r\nrisk:\"High volatility can produce sharp reversals after the initial move.\",\r\nmove:9.8\r\n},\r\n\r\n{\r\ntitle:\"Case #003 \u2014 The Mean Reversion Test\",\r\ntext:\"Price has travelled far below the lower Bollinger Band after several volatile sessions.\",\r\npattern:\"Bollinger Mean Reversion\",\r\ncorrect:\"WAIT\",\r\nvolatility:\"Volatility is elevated.\",\r\nbands:\"Price is trading well outside the lower Bollinger Band.\",\r\ntrend:\"The short-term trend remains bearish.\",\r\nvolume:\"Selling volume is elevated.\",\r\natr:\"ATR is above its recent average.\",\r\nrisk:\"An oversold-looking price can remain weak for longer than expected.\",\r\nmove:3.4\r\n},\r\n\r\n{\r\ntitle:\"Case #004 \u2014 Riding the Upper Band\",\r\ntext:\"Price breaks above a resistance zone and begins travelling along the upper Bollinger Band.\",\r\npattern:\"Bollinger Band Breakout\",\r\ncorrect:\"BUY\",\r\nvolatility:\"Volatility is expanding.\",\r\nbands:\"Price is repeatedly holding near the upper Bollinger Band.\",\r\ntrend:\"The trend has turned strongly bullish.\",\r\nvolume:\"Volume expands during the breakout.\",\r\natr:\"ATR is increasing, indicating stronger price movement.\",\r\nrisk:\"A failed breakout can quickly return price inside the bands.\",\r\nmove:11.3\r\n},\r\n\r\n{\r\ntitle:\"Case #005 \u2014 The False Band Break\",\r\ntext:\"Price pushes above the upper Bollinger Band, but buying interest quickly disappears.\",\r\npattern:\"False Bollinger Breakout\",\r\ncorrect:\"SELL\",\r\nvolatility:\"Volatility spikes during the attempted breakout.\",\r\nbands:\"Price moves outside the upper band and then closes back inside it.\",\r\ntrend:\"The broader trend is weakening near resistance.\",\r\nvolume:\"The breakout volume is lower than expected.\",\r\natr:\"ATR rises briefly and then begins stabilising.\",\r\nrisk:\"A genuine breakout could still develop if price reclaims the high.\",\r\nmove:-7.2\r\n},\r\n\r\n{\r\ntitle:\"Case #006 \u2014 ATR Storm Warning\",\r\ntext:\"The Average True Range begins rising rapidly while price swings become increasingly large.\",\r\npattern:\"ATR Volatility Expansion\",\r\ncorrect:\"WAIT\",\r\nvolatility:\"Volatility is increasing quickly.\",\r\nbands:\"The Bollinger Bands are widening.\",\r\ntrend:\"Direction is uncertain despite the larger price swings.\",\r\nvolume:\"Volume is inconsistent.\",\r\natr:\"ATR has moved significantly above its recent average.\",\r\nrisk:\"Large price ranges increase both opportunity and potential loss.\",\r\nmove:2.8\r\n},\r\n\r\n{\r\ntitle:\"Case #007 \u2014 The Volatility Stop Hunt\",\r\ntext:\"A trader wants to place a very tight stop while the chart shows unusually high volatility.\",\r\npattern:\"Volatility-Based Stop\",\r\ncorrect:\"WAIT\",\r\nvolatility:\"Current volatility is substantially higher than normal.\",\r\nbands:\"The Bollinger Bands are wide.\",\r\ntrend:\"Price direction is still developing.\",\r\nvolume:\"Volume remains elevated.\",\r\natr:\"ATR indicates that normal price swings are much larger than usual.\",\r\nrisk:\"A stop placed too close to the entry can be triggered by normal volatility.\",\r\nmove:-4.6\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\nrevealed:false,\r\ndecision:null,\r\nshowBands:true,\r\nzoom:1\r\n};\r\n\r\n\r\nconst canvas=document.getElementById(\"vbd-chart\");\r\nconst ctx=canvas.getContext(\"2d\");\r\n\r\nlet data=[];\r\nlet future=[];\r\nlet visible=42;\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\ndata=[];\r\nfuture=[];\r\n\r\nlet price=100;\r\n\r\nfor(let i=0;i<42;i++){\r\n\r\nlet volatility;\r\n\r\nif(c.pattern===\"Bollinger Band Squeeze\"){\r\nvolatility=.5+(i\/42)*.25;\r\n}\r\n\r\nelse if(c.pattern===\"Volatility Expansion\"){\r\nvolatility=i<27?.7:3;\r\n}\r\n\r\nelse if(c.pattern===\"Bollinger Mean Reversion\"){\r\nvolatility=2.4;\r\n}\r\n\r\nelse if(c.pattern===\"Bollinger Band Breakout\"){\r\nvolatility=i<25?.8:2.4;\r\n}\r\n\r\nelse if(c.pattern===\"False Bollinger Breakout\"){\r\nvolatility=i<31?.9:2.5;\r\n}\r\n\r\nelse if(c.pattern===\"ATR Volatility Expansion\"){\r\nvolatility=i<25?.8:3;\r\n}\r\n\r\nelse{\r\nvolatility=2.7;\r\n}\r\n\r\nlet open=price;\r\n\r\nlet drift=0;\r\n\r\nif(\r\nc.correct===\"BUY\" &&\r\ni>28\r\n) drift=.8;\r\n\r\nif(\r\nc.correct===\"SELL\" &&\r\ni>28\r\n) drift=-.8;\r\n\r\nlet close=open+drift+\r\n(Math.random()-.5)*volatility*2;\r\n\r\nlet high=Math.max(open,close)+Math.random()*volatility;\r\nlet low=Math.min(open,close)-Math.random()*volatility;\r\n\r\ndata.push({\r\nopen,\r\nhigh,\r\nlow,\r\nclose,\r\nvolume:100+volatility*40+Math.random()*70\r\n});\r\n\r\nprice=close;\r\n\r\n}\r\n\r\n\r\n\/* Force scenario characteristics *\/\r\n\r\nlet last=data[data.length-1];\r\n\r\nif(c.pattern===\"Bollinger Band Squeeze\"){\r\n\r\nfor(let i=28;i<42;i++){\r\n\r\nlet base=100+(Math.random()-.5)*1.8;\r\n\r\ndata[i].open=base;\r\ndata[i].close=base+(Math.random()-.5)*.8;\r\ndata[i].high=Math.max(data[i].open,data[i].close)+.5;\r\ndata[i].low=Math.min(data[i].open,data[i].close)-.5;\r\ndata[i].volume=70+Math.random()*20;\r\n\r\n}\r\n\r\n}\r\n\r\nif(c.pattern===\"Volatility Expansion\"){\r\n\r\nlast.open=100;\r\nlast.close=111;\r\nlast.high=114;\r\nlast.low=98;\r\nlast.volume=260;\r\n\r\n}\r\n\r\nif(c.pattern===\"Bollinger Mean Reversion\"){\r\n\r\nlast.open=100;\r\nlast.close=91;\r\nlast.high=102;\r\nlast.low=88;\r\nlast.volume=230;\r\n\r\n}\r\n\r\nif(c.pattern===\"Bollinger Band Breakout\"){\r\n\r\nlast.open=102;\r\nlast.close=113;\r\nlast.high=116;\r\nlast.low=101;\r\nlast.volume=250;\r\n\r\n}\r\n\r\nif(c.pattern===\"False Bollinger Breakout\"){\r\n\r\nlast.open=104;\r\nlast.close=100;\r\nlast.high=116;\r\nlast.low=98;\r\nlast.volume=120;\r\n\r\n}\r\n\r\nif(c.pattern===\"ATR Volatility Expansion\"){\r\n\r\nlast.open=108;\r\nlast.close=96;\r\nlast.high=112;\r\nlast.low=91;\r\nlast.volume=240;\r\n\r\n}\r\n\r\nif(c.pattern===\"Volatility-Based Stop\"){\r\n\r\nlast.open=101;\r\nlast.close=104;\r\nlast.high=111;\r\nlast.low=95;\r\nlast.volume=220;\r\n\r\n}\r\n\r\n\r\n\/* Future candles *\/\r\n\r\nlet previous=data[data.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=previous;\r\n\r\nlet close=open+\r\ndir*(1.5+Math.random()*2.8);\r\n\r\nfuture.push({\r\nopen,\r\nclose,\r\nhigh:Math.max(open,close)+1.3,\r\nlow:Math.min(open,close)-1.3,\r\nvolume:140+Math.random()*80\r\n});\r\n\r\nprevious=close;\r\n\r\n}\r\n\r\nvisible=42;\r\n\r\n}\r\n\r\n\r\nfunction sma(arr,n,index){\r\n\r\nlet start=Math.max(0,index-n+1);\r\nlet values=[];\r\n\r\nfor(let i=start;i<=index;i++){\r\nvalues.push(arr[i].close);\r\n}\r\n\r\nreturn values.reduce((a,b)=>a+b,0)\/values.length;\r\n\r\n}\r\n\r\n\r\nfunction std(arr,n,index){\r\n\r\nlet start=Math.max(0,index-n+1);\r\nlet values=[];\r\n\r\nfor(let i=start;i<=index;i++){\r\nvalues.push(arr[i].close);\r\n}\r\n\r\nlet mean=values.reduce((a,b)=>a+b,0)\/values.length;\r\n\r\nreturn Math.sqrt(\r\nvalues.reduce((s,v)=>s+Math.pow(v-mean,2),0)\/\r\nvalues.length\r\n);\r\n\r\n}\r\n\r\n\r\nfunction draw(){\r\n\r\nif(!data.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 arr=state.revealed\r\n?data.concat(future)\r\n:data.slice(0,visible);\r\n\r\nlet max=Math.max(...arr.map(x=>x.high))+4;\r\nlet min=Math.min(...arr.map(x=>x.low))-4;\r\n\r\nlet range=max-min;\r\n\r\nfunction y(v){\r\nreturn h-((v-min)\/range)*(h-35)-15;\r\n}\r\n\r\n\r\n\/* Bollinger Bands *\/\r\n\r\nif(state.showBands){\r\n\r\nlet upper=[];\r\nlet middle=[];\r\nlet lower=[];\r\n\r\narr.forEach((c,i)=>{\r\n\r\nlet m=sma(arr,20,i);\r\nlet sd=std(arr,20,i);\r\n\r\nmiddle.push(m);\r\nupper.push(m+2*sd);\r\nlower.push(m-2*sd);\r\n\r\n});\r\n\r\n\r\nctx.lineWidth=2;\r\n\r\nctx.strokeStyle=\"#a78bfa\";\r\n\r\nfunction line(values){\r\n\r\nctx.beginPath();\r\n\r\nvalues.forEach((v,i)=>{\r\n\r\nlet x=(i+.5)*(w\/arr.length);\r\n\r\nif(i===0)\r\nctx.moveTo(x,y(v));\r\nelse\r\nctx.lineTo(x,y(v));\r\n\r\n});\r\n\r\nctx.stroke();\r\n\r\n}\r\n\r\nline(upper);\r\nline(middle);\r\nline(lower);\r\n\r\n}\r\n\r\n\r\nlet cw=Math.max(5,(w\/arr.length)*.55);\r\n\r\n\r\narr.forEach((c,i)=>{\r\n\r\nlet x=(i+.5)*(w\/arr.length);\r\n\r\nlet oy=y(c.open);\r\nlet cy=y(c.close);\r\nlet hy=y(c.high);\r\nlet ly=y(c.low);\r\n\r\nlet bullish=c.close>=c.open;\r\n\r\nctx.strokeStyle=bullish?\"#22c55e\":\"#ef4444\";\r\nctx.fillStyle=bullish?\"#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\nif(state.revealed && i>=data.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 x=(data.length-.5)*(w\/arr.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 loadClues(){\r\n\r\nlet c=cases[state.index];\r\n\r\nlet values={\r\nvolatility:c.volatility,\r\nbands:c.bands,\r\ntrend:c.trend,\r\nvolume:c.volume,\r\natr:c.atr,\r\nrisk:c.risk\r\n};\r\n\r\ndocument.querySelectorAll(\".vbd-clue\").forEach(el=>{\r\n\r\nel.querySelector(\".vbd-clue-text\").textContent=\r\nvalues[el.dataset.key];\r\n\r\nel.querySelector(\".vbd-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\nstate.showBands=true;\r\n\r\ndocument.getElementById(\"vbd-case-title\").textContent=c.title;\r\n\r\ndocument.getElementById(\"vbd-case-text\").textContent=c.text;\r\n\r\ndocument.getElementById(\"vbd-number\").textContent=\r\n(state.index+1)+\" \/ \"+cases.length;\r\n\r\ndocument.getElementById(\"vbd-progress\").style.width=\r\n(state.index\/cases.length*100)+\"%\";\r\n\r\ndocument.getElementById(\"vbd-result\").style.display=\"none\";\r\n\r\ndocument.getElementById(\"vbd-reveal\").textContent=\r\n\"\u23e9 Reveal Volatility Move\";\r\n\r\ngenerate(c);\r\nloadClues();\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(\"vbd-score\").textContent=state.score;\r\n\r\ndocument.getElementById(\"vbd-cases\").textContent=state.solved;\r\n\r\ndocument.getElementById(\"vbd-accuracy\").textContent=\r\nMath.round(state.correct\/state.solved*100)+\"%\";\r\n\r\n\r\nlet rank=\"Rookie\";\r\n\r\nif(state.score>=600)\r\nrank=\"Volatility Master\";\r\nelse if(state.score>=400)\r\nrank=\"Volatility Detective\";\r\nelse if(state.score>=200)\r\nrank=\"Market Analyst\";\r\nelse if(state.score>=100)\r\nrank=\"Junior Detective\";\r\n\r\ndocument.getElementById(\"vbd-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\udf2a\ufe0f Excellent Volatility Detection!\";\r\n\r\ntext=\r\n\"You interpreted the volatility evidence correctly.\\n\\n\"+\r\n\"The case 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 Volatility Evidence Said Otherwise\";\r\n\r\ntext=\r\n\"Your decision was not the strongest interpretation of this setup.\\n\\n\"+\r\n\"The case 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\ndocument.getElementById(\"vbd-result-title\").textContent=title;\r\n\r\ndocument.getElementById(\"vbd-result-text\").textContent=text;\r\n\r\ndocument.getElementById(\"vbd-answer\").textContent=\r\n\"\ud83c\udf2a\ufe0f Setup: \"+c.pattern+\r\n\" | Best Game Decision: \"+c.correct;\r\n\r\ndocument.getElementById(\"vbd-points\").textContent=\r\n\"+\"+points+\" Detective Points\";\r\n\r\ndocument.getElementById(\"vbd-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(\"vbd-reveal\").textContent=\r\n\"\u2705 Volatility Move Revealed\";\r\n\r\n}\r\n\r\n\r\nfunction zoomIn(){\r\n\r\nvisible=Math.max(24,visible-5);\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction zoomOut(){\r\n\r\nvisible=Math.min(42,visible+5);\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\nfunction reset(){\r\n\r\nvisible=42;\r\nstate.revealed=false;\r\n\r\ndocument.getElementById(\"vbd-reveal\").textContent=\r\n\"\u23e9 Reveal Volatility Move\";\r\n\r\ndraw();\r\n\r\n}\r\n\r\n\r\ndocument.querySelectorAll(\".vbd-clue\").forEach(el=>{\r\n\r\nel.addEventListener(\"click\",function(){\r\n\r\nlet box=this.querySelector(\".vbd-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(\"vbd-reveal\")\r\n.addEventListener(\"click\",reveal);\r\n\r\n\r\ndocument.getElementById(\"vbd-zoom-in\")\r\n.addEventListener(\"click\",zoomIn);\r\n\r\n\r\ndocument.getElementById(\"vbd-zoom-out\")\r\n.addEventListener(\"click\",zoomOut);\r\n\r\n\r\ndocument.getElementById(\"vbd-reset\")\r\n.addEventListener(\"click\",reset);\r\n\r\n\r\ndocument.getElementById(\"vbd-bands\")\r\n.addEventListener(\"click\",function(){\r\n\r\nstate.showBands=!state.showBands;\r\n\r\nthis.textContent=\r\nstate.showBands\r\n?\"Bollinger Bands\"\r\n:\"Show Bands\";\r\n\r\ndraw();\r\n\r\n});\r\n\r\n\r\ndocument.getElementById(\"vbd-next\")\r\n.addEventListener(\"click\",function(){\r\n\r\nstate.index++;\r\n\r\nif(state.index>=cases.length){\r\n\r\nalert(\r\n\"\ud83c\udfc6 Volatility & Bollinger 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\nstate.index=0;\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 r=canvas.getBoundingClientRect();\r\n\r\nlet x=\r\n(e.clientX-r.left)*\r\n(canvas.width\/r.width);\r\n\r\nlet arr=state.revealed\r\n?data.concat(future)\r\n:data.slice(0,visible);\r\n\r\nlet index=Math.floor(\r\nx\/(canvas.width\/arr.length)\r\n);\r\n\r\nif(index<0 || index>=arr.length)return;\r\n\r\nlet c=arr[index];\r\n\r\ndocument.getElementById(\"vbd-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\nload();\r\n\r\nsetTimeout(resize,100);\r\n\r\n})();\r\n<\/script>\r\n\r\n<\/div>\n<h1>Volatility &amp; Bollinger Detective \u2013 Interactive Technical Analysis Game<\/h1>\n<p style=\"text-align: justify;\">Welcome to <strong>Volatility &amp; Bollinger Detective<\/strong>, an interactive <a href=\"https:\/\/www.stockmaster.in\/universe\/category\/stock-market-games\/technical-analysis-games\/\">technical analysis game<\/a> from <a href=\"https:\/\/www.stockmaster.in\/universe\/\">StockMaster Universe<\/a> where you investigate market volatility, study Bollinger Bands and analyse changing price behaviour through simulated trading scenarios.<\/p>\n<p style=\"text-align: justify;\">Instead of answering traditional quiz questions, you become a market detective. Each case presents a simulated candlestick chart containing clues about <strong>volatility, Bollinger Bands, price trends, trading volume, Average True Range (ATR) and risk<\/strong>. Your task is to investigate the evidence and decide whether the market setup suggests <strong>BUY, SELL or WAIT<\/strong>.<\/p>\n<p style=\"text-align: justify;\">The game introduces important volatility concepts through practical scenarios. You will investigate a <strong>Bollinger Band Squeeze<\/strong>, where decreasing volatility can signal that a larger move may eventually develop. You will also encounter <strong>volatility expansion, Bollinger Band breakouts, mean reversion, false breakouts, ATR volatility expansion and volatility-based risk management<\/strong>.<\/p>\n<p style=\"text-align: justify;\">A key lesson of the game is that volatility does not automatically tell you the direction of the market. A narrow Bollinger Band can indicate compression, but the eventual breakout may occur in either direction. Similarly, a price move outside a Bollinger Band does not automatically mean that a reversal or continuation is guaranteed.<\/p>\n<p style=\"text-align: justify;\">As you solve cases, you earn <strong>Detective Points<\/strong>, improve your accuracy and progress through different ranks. After making your decision, you can reveal the simulated market movement and compare your interpretation with the scenario outcome.<\/p>\n<p style=\"text-align: justify;\">Volatility &amp; Bollinger Detective is designed for beginners, students and technical-analysis learners who want a more engaging way to understand <strong>Bollinger Bands, volatility, ATR and price behaviour<\/strong>.<\/p>\n<p style=\"text-align: justify;\">Study the chart, investigate the evidence, make your decision and reveal what happened next.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Volatility &amp; Bollinger Detective \u2013 Interactive Technical Analysis Game Welcome to Volatility &amp; Bollinger Detective, an interactive technical analysis game [&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-546","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":"Volatility &amp; Bollinger Detective \u2013 Interactive Technical Analysis Game Welcome to Volatility &amp; Bollinger Detective, an interactive technical analysis game [&hellip;]","_links":{"self":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/posts\/546","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=546"}],"version-history":[{"count":0,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/posts\/546\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stockmaster.in\/universe\/wp-json\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}