svg_candles: cautarea nivelurilor, scoasa in functie comuna; 11 generatoare reparate
Unsprezece generatoare nu mai rulau deloc la HEAD: cautau <line x1="24", iar svg_candles scrie x1="24.0" de cand are Level.i0. Un generator mort inseamna ca diagrama nu mai poate fi regenerata, si nimeni n-ar fi aflat pana cand ar fi incercat cineva, peste luni. Cele 11 copii ale aceluiasi regex au disparut: y_niveluri() si offset_render() se agata acum de semnatura liniei de Level (stroke-width + dasharray), nu de x-ul ei. Caz nou in selftest, cu Level(i0=) si panou de volum - combinatia la care varianta veche fie crapa, fie prindea tacut linia de zero a volumului. 41 de SVG-uri regenerate, toate identice cu cele comise dupa normalizarea x1=24 -> x1=24.0, deci niciun desen n-a sarit. Verificarea asta a prins o regresie reala: la buy_doji_transe substitutia lasase scaderea veche pe randul urmator, offsetul se scadea de doua ori si desenul urca 92 px. Inca doua generatoare moarte din aceeasi familie, gasite pe drum (intrarea_cazul_lui, intrarea_doua_variante): desenau peste grafic citind ch._y() fara offset. Nu crapau zgomotos - produceau suprapuneri la 22 px. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ThN7ixZrowca8aTGrK1MUJ
This commit is contained in:
@@ -99,12 +99,12 @@ Tot trade-ul, pe un exemplu construit:
|
||||
<text x="274.5" y="353.0" fill="#188a3e" style="font-weight:bold">3. confirmarea</text>
|
||||
<rect x="289.5" y="278.0" width="184.0" height="200.0" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<text x="289.5" y="273.0" fill="#1a5fb4" style="font-weight:bold">4. ieșirea: o treime la țintă, restul pe trail</text>
|
||||
<line x1="24" y1="410.0" x2="695" y2="410.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="404.0" fill="#1a5fb4">ținta 1: 51.60</text>
|
||||
<line x1="24" y1="458.0" x2="695" y2="458.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="452.0" fill="#188a3e">intrare 50.40</text>
|
||||
<line x1="24" y1="506.0" x2="695" y2="506.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="500.0" fill="#c00">stop 49.20</text>
|
||||
<line x1="24.0" y1="410.0" x2="695" y2="410.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="404.0" fill="#1a5fb4">ținta 1: 51.60</text>
|
||||
<line x1="24.0" y1="458.0" x2="695" y2="458.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="452.0" fill="#188a3e">intrare 50.40</text>
|
||||
<line x1="24.0" y1="506.0" x2="695" y2="506.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="500.0" fill="#c00">stop 49.20</text>
|
||||
<polyline points="329.0,304.5 344.0,321.4 359.0,335.4 374.0,349.9 389.0,362.5 404.0,372.3 419.0,382.7 434.0,390.8 449.0,395.7 464.0,402.7 479.0,408.1 494.0,411.5 509.0,412.3" fill="none" stroke="#999" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="515" y="406" fill="#999">MA(20)</text>
|
||||
<line x1="44.0" y1="56.0" x2="44.0" y2="78.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
@@ -945,11 +945,11 @@ nici stopul, ieși oricum, la close-ul celei de-a 8-a.
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">A — prima treime la țintă, a doua pe trailing stop</text>
|
||||
<rect x="146.5" y="176.0" width="73.0" height="96.0" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<rect x="218.5" y="122.0" width="163.0" height="84.0" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<line x1="24" y1="190.0" x2="746" y2="190.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="190.0" x2="746" y2="190.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="732" y="184.0" fill="#188a3e" text-anchor="end">ținta 1: 51.60 (= 1R)</text>
|
||||
<line x1="24" y1="238.0" x2="746" y2="238.0" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="238.0" x2="746" y2="238.0" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="732" y="232.0" fill="#555" text-anchor="end">intrarea: 50.40</text>
|
||||
<line x1="24" y1="286.0" x2="746" y2="286.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="286.0" x2="746" y2="286.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="732" y="280.0" fill="#c00" text-anchor="end">stopul: 49.20</text>
|
||||
<line x1="48.0" y1="56.0" x2="48.0" y2="126.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="43.5" y="66.0" width="9" height="48.0" fill="#c00"/>
|
||||
@@ -1013,11 +1013,11 @@ nici stopul, ieși oricum, la close-ul celei de-a 8-a.
|
||||
<line x1="24" y1="405" x2="746" y2="405" stroke="#ddd"/>
|
||||
<text x="24" y="460" fill="#333" style="font-weight:bold">B — limita de 8 candele: nici ținta, nici stopul</text>
|
||||
<rect x="164.5" y="602.0" width="145.0" height="96.0" fill="#555" fill-opacity="0.08" stroke="#555" stroke-width="1"/>
|
||||
<line x1="24" y1="602.0" x2="746" y2="602.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="602.0" x2="746" y2="602.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="732" y="596.0" fill="#188a3e" text-anchor="end">ținta 1: 51.60 — neatinsă</text>
|
||||
<line x1="24" y1="650.0" x2="746" y2="650.0" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="650.0" x2="746" y2="650.0" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="732" y="644.0" fill="#555" text-anchor="end">intrarea: 50.40</text>
|
||||
<line x1="24" y1="698.0" x2="746" y2="698.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="698.0" x2="746" y2="698.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="732" y="692.0" fill="#c00" text-anchor="end">stopul: 49.20 — neatins</text>
|
||||
<line x1="48.0" y1="468.0" x2="48.0" y2="538.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="43.5" y="478.0" width="9" height="48.0" fill="#c00"/>
|
||||
@@ -1104,11 +1104,11 @@ Exemplul de mai jos e alt simbol, pe altă scară de preț (în jur de 99 $, nu
|
||||
<rect x="354.5" y="96.0" width="79.0" height="51.8" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<rect x="354.5" y="147.8" width="79.0" height="51.8" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<rect x="534.5" y="262.5" width="119.0" height="0.9" fill="#555" fill-opacity="0.08" stroke="#555" stroke-width="1"/>
|
||||
<line x1="24" y1="96.0" x2="826" y2="96.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="96.0" x2="826" y2="96.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="812" y="90.0" fill="#c00" text-anchor="end">stop 100.15</text>
|
||||
<line x1="24" y1="147.8" x2="826" y2="147.8" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="147.8" x2="826" y2="147.8" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="812" y="141.8" fill="#b06000" text-anchor="end">intrare short 99.00</text>
|
||||
<line x1="24" y1="199.5" x2="826" y2="199.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="199.5" x2="826" y2="199.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="812" y="193.5" fill="#188a3e" text-anchor="end">ținta 97.85</text>
|
||||
<line x1="44.0" y1="404.3" x2="44.0" y2="429.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="417.8" width="9" height="1.6" fill="#188a3e"/>
|
||||
@@ -1268,8 +1268,8 @@ Cele două panouri din diagramă sunt alte simboluri, cu alte prețuri (42 $ și
|
||||
<svg viewBox="0 0 1160 519" width="1160" height="519" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif"><text x="580" y="20" fill="#333" text-anchor="middle" style="font-weight:bold">Setup A+ vs. setup mediocru (două panouri, exemple construite)</text><g transform="translate(8,38)">
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">A+ — doji la suport, volum în acumulare</text>
|
||||
<rect x="184.5" y="256.2" width="19.0" height="33.0" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<line x1="24" y1="282.6" x2="546" y2="282.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="276.6" fill="#188a3e">suport 42.00</text>
|
||||
<line x1="24.0" y1="282.6" x2="546" y2="282.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="276.6" fill="#188a3e">suport 42.00</text>
|
||||
<line x1="44.0" y1="56.0" x2="44.0" y2="78.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="62.6" width="9" height="8.8" fill="#c00"/>
|
||||
<line x1="59.0" y1="64.8" x2="59.0" y2="95.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
@@ -1355,7 +1355,7 @@ Cele două panouri din diagramă sunt alte simboluri, cu alte prețuri (42 $ și
|
||||
<text x="200.5" y="451.7" fill="#188a3e" style="font-weight:bold">volum în creștere = acumulare</text></g><g transform="translate(592,38)">
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">Mediocru — gap-up în rezistență, volum varză</text>
|
||||
<rect x="229.5" y="56.0" width="49.0" height="86.5" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<line x1="24" y1="80.6" x2="546" y2="80.6" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="80.6" x2="546" y2="80.6" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="532" y="74.6" fill="#c00" text-anchor="end">rezistență 78.50</text>
|
||||
<line x1="44.0" y1="252.2" x2="44.0" y2="272.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="256.6" width="9" height="11.0" fill="#188a3e"/>
|
||||
@@ -1884,14 +1884,14 @@ restul cu ordine limită (se execută doar la prețul dat sau mai bun) mai jos,
|
||||
<svg viewBox="0 0 1372 1031" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">Intrarea în trei tranșe — același trade (doji 50.10 / 49.25)</text>
|
||||
<rect x="218.3" y="572.0" width="20.0" height="120.0" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<line x1="24" y1="284.0" x2="1358" y2="284.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<line x1="24.0" y1="284.0" x2="1358" y2="284.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<text x="1344" y="278.0" fill="#188a3e" text-anchor="end">ținta 1: 51.60 = 1R față de close</text>
|
||||
<line x1="24" y1="351.2" x2="1358" y2="351.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<line x1="24.0" y1="351.2" x2="1358" y2="351.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<text x="1344" y="345.2" fill="#1a5fb4" text-anchor="end">ținta 1: 51.32 = 1R față de prețul mediu 50.26</text>
|
||||
<line x1="24" y1="572.0" x2="1358" y2="572.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="572.0" x2="1358" y2="572.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="1344" y="566.0" fill="#188a3e" text-anchor="end">intrarea (close-ul de confirmare): 50.40</text>
|
||||
<line x1="24" y1="860.0" x2="1358" y2="860.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="854.0" fill="#c00">stopul: 49.20</text>
|
||||
<line x1="24.0" y1="860.0" x2="1358" y2="860.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="854.0" fill="#c00">stopul: 49.20</text>
|
||||
<line x1="108.3" y1="56.0" x2="108.3" y2="500.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="103.3" y="116.0" width="10" height="312.0" fill="#c00"/>
|
||||
<line x1="138.3" y1="368.0" x2="138.3" y2="824.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
@@ -1976,16 +1976,16 @@ candela e înaltă. Nu alerga după preț: „poate nu mai face niciodată".
|
||||
<text x="559.5" y="111.8" fill="#188a3e" style="font-weight:bold">3. trendul pornește</text>
|
||||
<rect x="859.5" y="69.6" width="34.0" height="51.2" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<text x="859.5" y="64.6" fill="#1a5fb4" style="font-weight:bold">4. ținta</text>
|
||||
<line x1="24" y1="332.8" x2="976" y2="332.8" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="326.8" fill="#777">pivot lunar 86.00</text>
|
||||
<line x1="24" y1="369.2" x2="976" y2="369.2" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="363.2" fill="#c00">stop 81.45 = 9 % sub intrare (procent real)</text>
|
||||
<line x1="24" y1="304.8" x2="976" y2="304.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="332.8" x2="976" y2="332.8" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="326.8" fill="#777">pivot lunar 86.00</text>
|
||||
<line x1="24.0" y1="369.2" x2="976" y2="369.2" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="363.2" fill="#c00">stop 81.45 = 9 % sub intrare (procent real)</text>
|
||||
<line x1="24.0" y1="304.8" x2="976" y2="304.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="962" y="298.8" fill="#188a3e" text-anchor="end">intrare 89.50</text>
|
||||
<line x1="24" y1="240.4" x2="976" y2="240.4" stroke="#777" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30" y="234.4" fill="#777">ținta 1:1 97.55</text>
|
||||
<line x1="24" y1="90.0" x2="976" y2="90.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="84.0" fill="#1a5fb4">116.35 = +30 % față de intrare (procent real)</text>
|
||||
<line x1="24.0" y1="240.4" x2="976" y2="240.4" stroke="#777" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30.0" y="234.4" fill="#777">ținta 1:1 97.55</text>
|
||||
<line x1="24.0" y1="90.0" x2="976" y2="90.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="84.0" fill="#1a5fb4">116.35 = +30 % față de intrare (procent real)</text>
|
||||
<polyline points="329.0,269.5 344.0,277.3 359.0,285.1 374.0,292.9 389.0,300.5 404.0,308.0 419.0,315.0 434.0,320.8 449.0,325.5 464.0,329.4 479.0,333.1 494.0,336.9 509.0,340.5 524.0,341.9 539.0,342.5 554.0,340.9 569.0,337.5 584.0,333.0 599.0,330.4 614.0,327.6 629.0,324.6 644.0,320.6 659.0,315.4 674.0,309.9 689.0,303.6 704.0,297.2 719.0,290.3 734.0,282.7 749.0,275.0 764.0,268.0 779.0,259.2 794.0,249.0 809.0,238.8 824.0,229.0 839.0,218.4 854.0,208.6 869.0,198.9 884.0,189.5" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="890" y="184" fill="#b06000">SMA-20</text>
|
||||
<line x1="44.0" y1="137.6" x2="44.0" y2="160.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
Reference in New Issue
Block a user