[{"data":1,"prerenderedAt":721},["ShallowReactive",2],{"navigation_docs_en":3,"-en-dev-trade-chart":160,"-en-dev-trade-chart-surround":718},[4,25,87,121,136],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fen\u002Fgetting-started","en\u002F1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fen\u002Fgetting-started\u002Fintroduction","en\u002F1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"First Launch","\u002Fen\u002Fgetting-started\u002Ffirst-launch","en\u002F1.getting-started\u002F3.first-launch","i-lucide-rocket",{"title":26,"icon":6,"path":27,"stem":28,"children":29,"page":6},"User Guide","\u002Fen\u002Fguide","en\u002F2.guide",[30,57,62,67,72,77,82],{"title":31,"path":32,"stem":33,"children":34},"File Import","\u002Fen\u002Fguide\u002Fimport","en\u002F2.guide\u002F1.import\u002Findex",[35,36,41,45,49,53],{"title":31,"path":32,"stem":33},{"title":37,"path":38,"stem":39,"icon":40},"MetaTrader 5","\u002Fen\u002Fguide\u002Fimport\u002Fmt5","en\u002F2.guide\u002F1.import\u002F1.mt5","i-lucide-file-spreadsheet",{"title":42,"path":43,"stem":44,"icon":40},"NinjaTrader 8","\u002Fen\u002Fguide\u002Fimport\u002Fninja-trader","en\u002F2.guide\u002F1.import\u002F2.ninja-trader",{"title":46,"path":47,"stem":48,"icon":40},"Interactive Brokers","\u002Fen\u002Fguide\u002Fimport\u002Finteractive-brokers","en\u002F2.guide\u002F1.import\u002F3.interactive-brokers",{"title":50,"path":51,"stem":52,"icon":40},"Quantower","\u002Fen\u002Fguide\u002Fimport\u002Fquantower","en\u002F2.guide\u002F1.import\u002F4.quantower",{"title":54,"path":55,"stem":56,"icon":40},"Standard CSV format","\u002Fen\u002Fguide\u002Fimport\u002Fstandard-csv","en\u002F2.guide\u002F1.import\u002F5.standard-csv",{"title":58,"path":59,"stem":60,"icon":61},"Dashboard and metrics","\u002Fen\u002Fguide\u002Fdashboard","en\u002F2.guide\u002F2.dashboard","i-lucide-chart-line",{"title":63,"path":64,"stem":65,"icon":66},"Calendar","\u002Fen\u002Fguide\u002Fcalendar","en\u002F2.guide\u002F3.calendar","i-lucide-calendar",{"title":68,"path":69,"stem":70,"icon":71},"Daily view","\u002Fen\u002Fguide\u002Fdaily-view","en\u002F2.guide\u002F4.daily-view","i-lucide-calendar-days",{"title":73,"path":74,"stem":75,"icon":76},"Trades","\u002Fen\u002Fguide\u002Ftrades","en\u002F2.guide\u002F5.trades","i-lucide-table",{"title":78,"path":79,"stem":80,"icon":81},"Notes panel","\u002Fen\u002Fguide\u002Fnotes","en\u002F2.guide\u002F6.notes","i-lucide-pen-tool",{"title":83,"path":84,"stem":85,"icon":86},"Tag system","\u002Fen\u002Fguide\u002Ftags","en\u002F2.guide\u002F7.tags","i-lucide-tag",{"title":88,"icon":6,"path":89,"stem":90,"children":91,"page":6},"Settings","\u002Fen\u002Fsettings","en\u002F3.settings",[92,97,102,106,111,116],{"title":93,"path":94,"stem":95,"icon":96},"Accounts","\u002Fen\u002Fsettings\u002Faccounts","en\u002F3.settings\u002F1.accounts","i-lucide-users",{"title":98,"path":99,"stem":100,"icon":101},"Symbols","\u002Fen\u002Fsettings\u002Fsymbols","en\u002F3.settings\u002F2.symbols","i-lucide-chart-candlestick",{"title":103,"path":104,"stem":105,"icon":86},"Tags","\u002Fen\u002Fsettings\u002Ftags","en\u002F3.settings\u002F3.tags",{"title":107,"path":108,"stem":109,"icon":110},"Backup","\u002Fen\u002Fsettings\u002Fbackups","en\u002F3.settings\u002F4.backups","i-lucide-database-backup",{"title":112,"path":113,"stem":114,"icon":115},"Plugins","\u002Fen\u002Fsettings\u002Fplugins","en\u002F3.settings\u002F6.plugins","i-lucide-puzzle",{"title":117,"path":118,"stem":119,"icon":120},"Options","\u002Fen\u002Fsettings\u002Foptions","en\u002F3.settings\u002F7.options","i-lucide-cog",{"title":122,"icon":6,"path":123,"stem":124,"children":125,"page":6},"Advanced","\u002Fen\u002Fadvanced","en\u002F4.advanced",[126,131],{"title":127,"path":128,"stem":129,"icon":130},"Configuration","\u002Fen\u002Fadvanced\u002Fconfiguration","en\u002F4.advanced\u002F1.configuration","i-lucide-settings",{"title":132,"path":133,"stem":134,"icon":135},"FAQ","\u002Fen\u002Fadvanced\u002Ffaq","en\u002F4.advanced\u002F3.faq","i-lucide-circle-help",{"title":137,"icon":138,"path":139,"stem":140,"children":141,"page":6},"Developer","i-lucide-code","\u002Fen\u002Fdev","en\u002F5.dev",[142,147,152,155],{"title":143,"path":144,"stem":145,"icon":146},"Technical reference","\u002Fen\u002Fdev\u002Ftechnical-reference","en\u002F5.dev\u002F1.technical-reference","i-lucide-server",{"title":148,"path":149,"stem":150,"icon":151},"External storage","\u002Fen\u002Fdev\u002Fexternal-storage","en\u002F5.dev\u002F2.external-storage","i-lucide-hard-drive",{"title":112,"path":153,"stem":154,"icon":115},"\u002Fen\u002Fdev\u002Fplugins","en\u002F5.dev\u002F3.plugins",{"title":156,"path":157,"stem":158,"icon":159},"Trade chart","\u002Fen\u002Fdev\u002Ftrade-chart","en\u002F5.dev\u002F4.trade-chart","i-lucide-candlestick-chart",{"id":161,"title":156,"body":162,"description":709,"extension":710,"links":711,"meta":712,"navigation":713,"path":157,"seo":714,"stem":158,"__hash__":717},"docs_en\u002Fen\u002F5.dev\u002F4.trade-chart.md",{"type":163,"value":164,"toc":691},"minimark",[165,169,174,185,282,290,296,375,378,382,387,390,400,403,407,410,416,429,433,444,448,451,455,466,486,502,506,529,610,613,617,633,637,675,678,681],[166,167,168],"p",{},"The trade chart is displayed inside the trade detail modal in the daily view. It renders a candlestick chart sourced from Polygon.io and overlays the trade entry, exit, and optionally adjacent trades.",[170,171,173],"h2",{"id":172},"symbol-mapping","Symbol mapping",[166,175,176,180,181,184],{},[177,178,179],"code",{},"tradeToPolygonSymbol()"," converts a trade symbol to a Polygon ticker based on the trade ",[177,182,183],{},"instrumentType",".",[186,187,188,219,243,252,261,276],"ul",{},[189,190,191,195,196,199,200,203,204,207,208,211,212,215,216,184],"li",{},[192,193,194],"strong",{},"Forex",": 6-letter pairs are prefixed with ",[177,197,198],{},"C:"," (e.g. ",[177,201,202],{},"EURUSD"," → ",[177,205,206],{},"C:EURUSD","). Metal aliases such as ",[177,209,210],{},"GOLD"," or ",[177,213,214],{},"XAU"," are mapped to ",[177,217,218],{},"C:XAUUSD",[189,220,221,224,225,228,229,232,233,199,236,203,239,242],{},[192,222,223],{},"Crypto",": matched against ",[177,226,227],{},"X:BASEQUOTE",". ",[177,230,231],{},"USDT"," is normalized to ",[177,234,235],{},"USD",[177,237,238],{},"BTCUSDT",[177,240,241],{},"X:BTCUSD",").",[189,244,245,248,249,242],{},[192,246,247],{},"Stock",": bare ticker (e.g. ",[177,250,251],{},"AAPL",[189,253,254,257,258,242],{},[192,255,256],{},"Future",": bare ticker with month\u002Fyear code (e.g. ",[177,259,260],{},"ESZ5",[189,262,263,266,267,199,270,203,273,242],{},[192,264,265],{},"Option",": prefixed with ",[177,268,269],{},"O:",[177,271,272],{},"AAPL240315C00150000",[177,274,275],{},"O:AAPL240315C00150000",[189,277,278,281],{},[192,279,280],{},"Any \u002F undefined",": if the symbol looks like a futures ticker, it is treated as a future.",[170,283,285,286,289],{"id":284},"polygon-alias-spgn","Polygon alias (",[177,287,288],{},"spgn",")",[166,291,292,293,295],{},"For symbols that don't map automatically, add a custom field named ",[177,294,288],{}," on the symbol configuration. The value is the Polygon ticker to use. An optional prefix forces the instrument type used to call the Polygon API:",[297,298,299,315],"table",{},[300,301,302],"thead",{},[303,304,305,309,312],"tr",{},[306,307,308],"th",{},"Prefix",[306,310,311],{},"Instrument type",[306,313,314],{},"Example",[316,317,318,333,347,361],"tbody",{},[303,319,320,326,328],{},[321,322,323],"td",{},[177,324,325],{},"ft:",[321,327,256],{},[321,329,330],{},[177,331,332],{},"ft:ES",[303,334,335,340,342],{},[321,336,337],{},[177,338,339],{},"fx:",[321,341,194],{},[321,343,344],{},[177,345,346],{},"fx:EURUSD",[303,348,349,354,356],{},[321,350,351],{},[177,352,353],{},"cr:",[321,355,223],{},[321,357,358],{},[177,359,360],{},"cr:BTCUSD",[303,362,363,368,370],{},[321,364,365],{},[177,366,367],{},"st:",[321,369,247],{},[321,371,372],{},[177,373,374],{},"st:AAPL",[166,376,377],{},"This is useful when a broker symbol differs from the Polygon ticker or when the instrument type needs to be overridden.",[170,379,381],{"id":380},"data-fetching","Data fetching",[383,384,386],"h3",{"id":385},"standard-aggregates-api","Standard aggregates API",[166,388,389],{},"Stocks, forex, crypto, and options use:",[391,392,397],"pre",{"className":393,"code":395,"language":396},[394],"language-text","https:\u002F\u002Fapi.polygon.io\u002Fv2\u002Faggs\u002Fticker\u002F{ticker}\u002Frange\u002F{multiplier}\u002F{timespan}\u002F{from}\u002F{to}\n","text",[177,398,395],{"__ignoreMap":399},"",[166,401,402],{},"Timestamps are returned in milliseconds and converted to seconds for the chart.",[383,404,406],{"id":405},"futures-api","Futures API",[166,408,409],{},"Futures use a dedicated endpoint:",[391,411,414],{"className":412,"code":413,"language":396},[394],"https:\u002F\u002Fapi.polygon.io\u002Ffutures\u002Fv1\u002Faggs\u002F{ticker}\n",[177,415,413],{"__ignoreMap":399},[166,417,418,419,422,423,422,426,242],{},"The futures API returns nanosecond timestamps and uses a different resolution format (",[177,420,421],{},"1min",", ",[177,424,425],{},"1hour",[177,427,428],{},"1session",[383,430,432],{"id":431},"contract-resolution","Contract resolution",[166,434,435,436,439,440,443],{},"If a futures symbol has no expiration code (e.g. ",[177,437,438],{},"MGC",") or if the trade falls inside the expiration month, the application queries the ",[177,441,442],{},"\u002Ffutures\u002Fv1\u002Fcontracts"," endpoint to find the front-month contract. Contracts in their expiration month are skipped to avoid degraded data, with a fallback to the nearest contract if necessary.",[170,445,447],{"id":446},"rate-limiting","Rate limiting",[166,449,450],{},"The Polygon free plan allows 5 requests per minute. The client enforces a minimum 12-second delay between requests and retries up to 3 times on HTTP 429 with exponential backoff (12s, 24s, 48s).",[170,452,454],{"id":453},"caching","Caching",[166,456,457,458,461,462,465],{},"Bars are cached in the browser via ",[177,459,460],{},"idb-keyval"," (",[177,463,464],{},"IndexedDB","). The cache uses period keys:",[186,467,468,477],{},[189,469,470,471,461,474,289],{},"Timeframes ≤ 5 minutes: ",[192,472,473],{},"ISO weeks",[177,475,476],{},"YYYY-Www",[189,478,479,480,461,483,289],{},"Timeframes > 5 minutes: ",[192,481,482],{},"months",[177,484,485],{},"YYYY-MM",[166,487,488,489,492,493,497,498,501],{},"Each period is stored separately under a key like ",[177,490,491],{},"polygon:{ticker}:{tf}:{periodKey}",". Historical periods are never refreshed; current or future periods are refreshed at most once per minute. A ",[494,495,496],"em",{},"Clear Polygon cache"," button in ",[192,499,500],{},"Settings → Options"," deletes all cached entries.",[170,503,505],{"id":504},"date-range-and-timeframes","Date range and timeframes",[166,507,508,509,422,512,422,515,518,519,422,522,422,525,528],{},"Available timeframes: ",[177,510,511],{},"1",[177,513,514],{},"5",[177,516,517],{},"15"," minutes, ",[177,520,521],{},"1 hour",[177,523,524],{},"4 hours",[177,526,527],{},"daily",". The requested range is centered on the trade with an adaptive buffer:",[297,530,531,544],{},[300,532,533],{},[303,534,535,538,541],{},[306,536,537],{},"Timeframe",[306,539,540],{},"Buffer bars",[306,542,543],{},"Approximate context",[316,545,546,557,568,579,589,599],{},[303,547,548,551,554],{},[321,549,550],{},"1 min",[321,552,553],{},"1500",[321,555,556],{},"~25 hours",[303,558,559,562,565],{},[321,560,561],{},"5 min",[321,563,564],{},"1000",[321,566,567],{},"~83 hours",[303,569,570,573,576],{},[321,571,572],{},"15 min",[321,574,575],{},"800",[321,577,578],{},"~200 hours",[303,580,581,583,586],{},[321,582,521],{},[321,584,585],{},"500",[321,587,588],{},"~500 hours",[303,590,591,593,596],{},[321,592,524],{},[321,594,595],{},"400",[321,597,598],{},"~1600 hours",[303,600,601,604,607],{},[321,602,603],{},"Daily",[321,605,606],{},"250",[321,608,609],{},"~250 days",[166,611,612],{},"On load, the chart scrolls to a visible window centered on the trade midpoint. The visible window is also adaptive by timeframe.",[170,614,616],{"id":615},"timezone-display","Timezone display",[166,618,619,620,461,622,422,625,628,629,632],{},"The chart axis and crosshair labels respect the timezone configured in ",[192,621,500],{},[177,623,624],{},"CURRENT",[177,626,627],{},"LOCAL",", or ",[177,630,631],{},"UTC","). This is independent of the raw UTC timestamps stored by Polygon.",[170,634,636],{"id":635},"markers-and-overlays","Markers and overlays",[186,638,639,657,663,669],{},[189,640,641,644,645,648,649,652,653,656],{},[192,642,643],{},"Entry \u002F exit markers",": ",[177,646,647],{},"BUY","\u002F",[177,650,651],{},"SELL"," arrows below the entry bar, ",[177,654,655],{},"EXIT"," arrow above the exit bar.",[189,658,659,662],{},[192,660,661],{},"Price segments",": short horizontal lines at the exact entry and exit prices.",[189,664,665,668],{},[192,666,667],{},"Trade line",": dashed line connecting entry and exit prices.",[189,670,671,674],{},[192,672,673],{},"Adjacent trades",": optional monochrome markers and price segments for other trades on the same symbol within the visible range.",[166,676,677],{},"Markers and segments that fall outside the fetched data range are skipped so the chart never crashes on missing data.",[170,679,127],{"id":680},"configuration",[166,682,683,684,686,687,690],{},"The Polygon API key is configured in ",[192,685,500],{},". The key is stored in the browser (persisted in ",[177,688,689],{},"localStorage",") and used for all trade chart requests. There is no fallback to a public or environment key.",{"title":399,"searchDepth":692,"depth":692,"links":693},2,[694,695,697,703,704,705,706,707,708],{"id":172,"depth":692,"text":173},{"id":284,"depth":692,"text":696},"Polygon alias (spgn)",{"id":380,"depth":692,"text":381,"children":698},[699,701,702],{"id":385,"depth":700,"text":386},3,{"id":405,"depth":700,"text":406},{"id":431,"depth":700,"text":432},{"id":446,"depth":692,"text":447},{"id":453,"depth":692,"text":454},{"id":504,"depth":692,"text":505},{"id":615,"depth":692,"text":616},{"id":635,"depth":692,"text":636},{"id":680,"depth":692,"text":127},"How the trade chart works in PnlTracker - Polygon integration, symbol mapping, caching, and rate limiting.","md",null,{},{"icon":159},{"title":715,"description":716},"Trade chart - PnlTracker","Technical details of the PnlTracker trade chart.","w-yuWyUjFJ7bSJKS3bcG4dt2thea3vOwadA1pC8pZu8",[719,711],{"title":112,"path":153,"stem":154,"description":720,"icon":115,"children":-1},"Plugin compilation and packaging guide for PnlTracker.",1785435092073]