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
@@ -2,11 +2,11 @@
|
||||
<rect x="24" y="297.0" width="682" height="13.2" fill="#7b2fbf" opacity="0.10"/><text x="28" y="324.2" fill="#7b2fbf">zona PPQ 95.80 — aici cumperi</text>
|
||||
<text x="367" y="345.2" fill="#c00" text-anchor="middle">fără stop-loss standard — nicio linie sub intrare</text>
|
||||
<text x="24" y="26" fill="#333" style="font-weight:bold">SPY — daily: corecție ≥4 % → zona PPQ → BIM + verde → intrare → TP +10 %</text>
|
||||
<line x1="24" y1="211.2" x2="706" y2="211.2" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="205.2" fill="#333">100.00 — swing high recent</text>
|
||||
<line x1="24" y1="299.2" x2="706" y2="299.2" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="211.2" x2="706" y2="211.2" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="205.2" fill="#333">100.00 — swing high recent</text>
|
||||
<line x1="24.0" y1="299.2" x2="706" y2="299.2" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="293.2" fill="#188a3e" text-anchor="end">intrare 96.00</text>
|
||||
<line x1="24" y1="88.0" x2="706" y2="88.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="88.0" x2="706" y2="88.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="82.0" fill="#1a5fb4" text-anchor="end">TP +10 % = 105.60</text>
|
||||
<line x1="44.0" y1="280.5" x2="44.0" y2="300.3" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="286.0" width="9" height="8.8" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -1,11 +1,11 @@
|
||||
<svg viewBox="0 0 680 557" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
|
||||
<rect x="24" y="233.5" width="642" height="12.6" fill="#7b2fbf" opacity="0.12"/>
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">SPY — daily: aceeași corecție, 4.0 % (DA) vs. 3.9 % (NU)</text>
|
||||
<line x1="24" y1="173.6" x2="666" y2="173.6" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="173.6" x2="666" y2="173.6" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="652" y="167.6" fill="#333" text-anchor="end">100.00 — swing high</text>
|
||||
<line x1="24" y1="257.6" x2="666" y2="257.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="257.6" x2="666" y2="257.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="652" y="251.6" fill="#188a3e" text-anchor="end">96.00 = 4.0 % — DA, intri</text>
|
||||
<line x1="24" y1="56.0" x2="666" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="56.0" x2="666" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="652" y="50.0" fill="#1a5fb4" text-anchor="end">TP +10 % = 105.60</text>
|
||||
<line x1="44.0" y1="378.3" x2="44.0" y2="402.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="383.6" width="9" height="12.6" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
@@ -1,8 +1,8 @@
|
||||
<svg viewBox="0 0 660 380" 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">SPY — monthly: intrare ianuarie 2005 la 117.43 → TP1 +10 % = 129.17</text>
|
||||
<line x1="24" y1="167.5" x2="646" y2="167.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="167.5" x2="646" y2="167.5" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="632" y="161.5" fill="#188a3e" text-anchor="end">intrare 117.43</text>
|
||||
<line x1="24" y1="56.0" x2="646" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="56.0" x2="646" y2="56.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="632" y="50.0" fill="#1a5fb4" text-anchor="end">TP1 129.17 (+10 %)</text>
|
||||
<polyline points="325.0,151.8 340.0,149.8 355.0,147.9 370.0,145.9 385.0,143.7 400.0,141.0 415.0,138.2 430.0,135.2 445.0,132.0 460.0,128.7 475.0,125.2 490.0,121.7" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="40.0" y1="179.7" x2="40.0" y2="191.1" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
@@ -8,9 +8,9 @@
|
||||
<text x="34" y="80" fill="#333" style="font-family:monospace;font-size:11px">R1 = 2 x PP - L = 2 x 95.80 - 90.40 = 101.20</text>
|
||||
<rect x="42.5" y="116.0" width="355.0" height="151.2" fill="#777" fill-opacity="0.08" stroke="#777" stroke-width="1"/>
|
||||
<rect x="394.5" y="126.4" width="195.0" height="68.0" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<line x1="24" y1="189.0" x2="706" y2="189.0" stroke="#7b2fbf" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="189.0" x2="706" y2="189.0" stroke="#7b2fbf" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="183.0" fill="#7b2fbf" text-anchor="end">PPQ 95.80 — zona 1</text>
|
||||
<line x1="24" y1="254.0" x2="706" y2="254.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="254.0" x2="706" y2="254.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="248.0" fill="#188a3e" text-anchor="end">SQ 90.80 — zona 2</text>
|
||||
<line x1="52.0" y1="183.2" x2="52.0" y2="197.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="47.5" y="186.4" width="9" height="7.8" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -6,12 +6,12 @@
|
||||
<text x="436" y="94" fill="#333" style="font-size:11px">ETF simplu (SPY): -20 %</text>
|
||||
<text x="436" y="109" fill="#333" style="font-size:11px">ETF cu levier 2x: -40 %</text>
|
||||
<text x="436" y="124" fill="#333" style="font-size:11px">ETF cu levier 3x (SPXL): -60 %</text>
|
||||
<line x1="24" y1="152.0" x2="706" y2="152.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="152.0" x2="706" y2="152.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="146.0" fill="#1a5fb4" text-anchor="end">TP +10 % = 105.60</text>
|
||||
<line x1="24" y1="205.8" x2="706" y2="205.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="205.8" x2="706" y2="205.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="199.8" fill="#188a3e" text-anchor="end">intrare 96.00</text>
|
||||
<line x1="24" y1="313.3" x2="706" y2="313.3" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="307.3" fill="#c00">fund 76.80 = -20 % pe poziție</text>
|
||||
<line x1="24.0" y1="313.3" x2="706" y2="313.3" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="307.3" fill="#c00">fund 76.80 = -20 % pe poziție</text>
|
||||
<line x1="56.0" y1="187.6" x2="56.0" y2="195.4" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="51.5" y="189.5" width="9" height="3.9" fill="#c00"/>
|
||||
<line x1="72.0" y1="191.5" x2="72.0" y2="201.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -12,7 +12,8 @@ date explicit: 21 și 27 deschid cu GAP (low peste high-ul precedentei),
|
||||
fiindcă regula de trail din curs se sprijină exact pe barele astea.
|
||||
"""
|
||||
import sys; sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Candle, Chart, Level, MA, Zone, Arrow, from_closes
|
||||
from svg_candles import (Candle, Chart, Level, MA, Zone, Arrow, from_closes,
|
||||
offset_render)
|
||||
|
||||
OUT = "/workspace/atm-curs-dl/gen/strategii/buy_doji_ansamblu.svg"
|
||||
|
||||
@@ -135,9 +136,7 @@ if __name__ == "__main__":
|
||||
svg = ch.render()
|
||||
# render() mută `top` intern (titlu, săgeți) și îl restaurează: ch._y() de aici
|
||||
# e mai sus cu atâta. Offsetul se citește din prima linie de Level desenată.
|
||||
import re as _re
|
||||
OFF = (float(_re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1))
|
||||
- ch._y(ch.levels[0].price))
|
||||
OFF = offset_render(svg, ch)
|
||||
|
||||
def Y(p):
|
||||
return ch._y(p) + OFF
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,8 +1,8 @@
|
||||
<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"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -18,7 +18,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from svg_candles import Chart, Level, Zone, Arrow, from_closes # noqa: E402
|
||||
from svg_candles import Chart, Level, Zone, Arrow, from_closes, offset_render # noqa: E402
|
||||
from buy_doji_ansamblu import serie, CONF, ENTRY, SL, TP1, R, trail # noqa: E402
|
||||
|
||||
OUT = Path(__file__).with_suffix(".svg")
|
||||
@@ -104,7 +104,7 @@ def panou(ch, sus_de=0.0):
|
||||
h = float(re.search(r'viewBox="0 0 [\d.]+ ([\d.]+)"', svg).group(1))
|
||||
# render() mută `top`/`left` intern și le restaurează: tot ce desenăm noi
|
||||
# după randare trebuie deplasat cu aceiași pixeli
|
||||
off_y = float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1)) - ch._y(ch.levels[0].price)
|
||||
off_y = offset_render(svg, ch)
|
||||
off_x = float(re.search(r'<line x1="([\d.]+)"[^>]*stroke="#1a1a1a"', svg).group(1)) - ch._cx(0)
|
||||
return svg[svg.index(">") + 1:svg.rindex("</svg>")].strip(), h, off_x, off_y
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<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"/>
|
||||
@@ -70,11 +70,11 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -10,16 +10,16 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -7,11 +7,11 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -15,7 +15,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from svg_candles import Chart, Level, Zone, Arrow # noqa: E402
|
||||
from svg_candles import Chart, Level, Zone, Arrow, offset_render # noqa: E402
|
||||
from buy_doji_ansamblu import serie, DOJI, CONF, DOJI_L, ENTRY, SL, TP1, R # noqa: E402
|
||||
|
||||
OUT = Path(__file__).with_suffix(".svg")
|
||||
@@ -73,8 +73,7 @@ ch = Chart(
|
||||
title="Intrarea în trei tranșe — același trade (doji 50.10 / 49.25)",
|
||||
)
|
||||
svg = ch.render()
|
||||
OFF = (float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1))
|
||||
- ch._y(ch.levels[0].price)) # render() mută `top` și îl restaurează
|
||||
OFF = offset_render(svg, ch) # render() mută `top` și îl restaurează
|
||||
|
||||
|
||||
# același lucru pe orizontală: render() lărgește pânza și mută `left` când un
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
@@ -1,10 +1,10 @@
|
||||
<svg viewBox="0 0 720 559" 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">Buy hammer — daily (ticker ilustrativ XYZ, din lecția de pattern)</text>
|
||||
<line x1="24" y1="382.4" x2="706" y2="382.4" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="376.4" fill="#c00">SL 62.05 — sub low-ul hammer-ului</text>
|
||||
<line x1="24" y1="340.8" x2="706" y2="340.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="382.4" x2="706" y2="382.4" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="376.4" fill="#c00">SL 62.05 — sub low-ul hammer-ului</text>
|
||||
<line x1="24.0" y1="340.8" x2="706" y2="340.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="334.8" fill="#188a3e" text-anchor="end">intrare 63.35</text>
|
||||
<line x1="24" y1="257.6" x2="706" y2="257.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="257.6" x2="706" y2="257.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="251.6" fill="#1a5fb4" text-anchor="end">TP 65.95 = 2R</text>
|
||||
<line x1="44.0" y1="56.0" x2="44.0" y2="73.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="64.0" width="9" height="1.6" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
@@ -16,7 +16,7 @@ import sys; sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl/gen/strategii")
|
||||
from pathlib import Path
|
||||
from hammer_mbt10_bh_ansamblu import serie
|
||||
from svg_candles import Arrow, Candle, Chart, Level, Zone
|
||||
from svg_candles import Arrow, Candle, Chart, Level, Zone, offset_render
|
||||
|
||||
OUT = Path(__file__).with_suffix(".svg")
|
||||
GREEN, RED, BLUE, ORANGE, GREY = "#188a3e", "#c00", "#1a5fb4", "#b06000", "#555"
|
||||
@@ -102,7 +102,7 @@ ch = Chart(
|
||||
svg = ch.render()
|
||||
m = re.search(r'viewBox="0 0 (\d+) (\d+)"', svg)
|
||||
W, H = int(m.group(1)), int(m.group(2))
|
||||
OFF = (float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1)) - ch._y(ch.levels[0].price))
|
||||
OFF = offset_render(svg, ch)
|
||||
Y = lambda p: ch._y(p) + OFF # noqa: E731
|
||||
|
||||
pts, etichete = [], []
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<rect x="348.4" y="114.5" width="83.0" height="58.5" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<text x="348.4" y="109.5" fill="#b06000" style="font-weight:bold">pullback</text>
|
||||
<rect x="444.4" y="82.2" width="51.0" height="60.2" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<line x1="24" y1="136.1" x2="771" y2="136.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="136.1" x2="771" y2="136.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="757" y="130.1" fill="#1a5fb4" text-anchor="end">65.95 = 2R — ținta din exemplul lecției</text>
|
||||
<line x1="24" y1="180.3" x2="771" y2="180.3" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="180.3" x2="771" y2="180.3" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="757" y="174.3" fill="#188a3e" text-anchor="end">64.65 = 1:1 — prima jumătate</text>
|
||||
<line x1="24" y1="224.5" x2="771" y2="224.5" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="218.5" fill="#555">intrare 63.35</text>
|
||||
<line x1="24" y1="268.7" x2="771" y2="268.7" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="262.7" fill="#c00">SL inițial 62.05</text>
|
||||
<line x1="24.0" y1="224.5" x2="771" y2="224.5" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="218.5" fill="#555">intrare 63.35</text>
|
||||
<line x1="24.0" y1="268.7" x2="771" y2="268.7" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="262.7" fill="#c00">SL inițial 62.05</text>
|
||||
<line x1="133.9" y1="190.5" x2="133.9" y2="233.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="129.4" y="199.0" width="9" height="23.8" fill="#c00"/>
|
||||
<line x1="149.9" y1="204.1" x2="149.9" y2="233.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -1,10 +1,10 @@
|
||||
<svg viewBox="0 0 720 621" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
|
||||
<text x="24" y="70" fill="#333" style="font-weight:bold">Sell hammer — oglinda pe short (daily, exemplu construit)</text>
|
||||
<line x1="24" y1="78.0" x2="706" y2="78.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="78.0" x2="706" y2="78.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="72.0" fill="#c00" text-anchor="end">SL 100.25 — peste high-ul sell hammer-ului</text>
|
||||
<line x1="24" y1="119.6" x2="706" y2="119.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="113.6" fill="#188a3e">intrare short 98.95</text>
|
||||
<line x1="24" y1="202.8" x2="706" y2="202.8" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="119.6" x2="706" y2="119.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="113.6" fill="#188a3e">intrare short 98.95</text>
|
||||
<line x1="24.0" y1="202.8" x2="706" y2="202.8" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="196.8" fill="#1a5fb4" text-anchor="end">TP 96.35 = 2R</text>
|
||||
<line x1="44.0" y1="386.8" x2="44.0" y2="404.4" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="396.4" width="9" height="1.6" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -14,7 +14,7 @@ import sys; sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl/gen/strategii")
|
||||
from pathlib import Path
|
||||
from hammer_mbt10_bh_ansamblu import serie
|
||||
from svg_candles import Arrow, Chart, Level, Zone
|
||||
from svg_candles import Arrow, Chart, Level, Zone, offset_render
|
||||
|
||||
OUT = Path(__file__).with_suffix(".svg")
|
||||
GREEN, RED, BLUE, ORANGE, GREY = "#188a3e", "#c00", "#1a5fb4", "#b06000", "#555"
|
||||
@@ -60,7 +60,7 @@ m = re.search(r'viewBox="0 0 (\d+) (\d+)"', svg)
|
||||
W, H = int(m.group(1)), int(m.group(2))
|
||||
|
||||
# paranteza de risc, desenată de mână: stop -> intrare, cu textul în dreapta
|
||||
OFF = (float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1)) - ch._y(ch.levels[0].price))
|
||||
OFF = offset_render(svg, ch)
|
||||
y_in, y_sl = ch._y(INTRARE) + OFF, ch._y(SL) + OFF
|
||||
xp = ch._cx(len(cds) - 2)
|
||||
brk = (f'<polyline points="{xp - 6:.1f},{y_in:.1f} {xp:.1f},{y_in:.1f} {xp:.1f},{y_sl:.1f} '
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<text x="24" y="64" fill="#333" style="font-weight:bold">Buy hammer — stopul și mărimea poziției (daily, ticker ilustrativ XYZ)</text>
|
||||
<rect x="257.3" y="163.0" width="49.0" height="77.6" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<text x="257.3" y="89.4" fill="#b06000" style="font-weight:bold">cele două bare care dau stopul</text>
|
||||
<line x1="24" y1="177.6" x2="740" y2="177.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="171.6" fill="#188a3e">intrare 63.35 (close-ul confirmării)</text>
|
||||
<line x1="24" y1="234.8" x2="740" y2="234.8" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="228.8" fill="#c00">SL 62.05</text>
|
||||
<line x1="24.0" y1="177.6" x2="740" y2="177.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="171.6" fill="#188a3e">intrare 63.35 (close-ul confirmării)</text>
|
||||
<line x1="24.0" y1="234.8" x2="740" y2="234.8" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="228.8" fill="#c00">SL 62.05</text>
|
||||
<line x1="138.8" y1="85.2" x2="138.8" y2="122.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="132.3" y="96.2" width="13" height="13.2" fill="#188a3e"/>
|
||||
<line x1="164.8" y1="85.2" x2="164.8" y2="157.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -1,12 +1,12 @@
|
||||
<svg viewBox="0 0 780 526" 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">MBT-10 — pullback în locul crimei + hammer, închidere la 54.60 (exemplu construit)</text>
|
||||
<line x1="24" y1="198.0" x2="766" y2="198.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="192.0" fill="#777">locul crimei 52.10 (fost vârf spart)</text>
|
||||
<line x1="24" y1="200.0" x2="766" y2="200.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="198.0" x2="766" y2="198.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="192.0" fill="#777">locul crimei 52.10 (fost vârf spart)</text>
|
||||
<line x1="24.0" y1="200.0" x2="766" y2="200.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="752" y="194.0" fill="#c00" text-anchor="end">SL 52.00 — sub codița hammer-ului</text>
|
||||
<line x1="24" y1="148.0" x2="766" y2="148.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="148.0" x2="766" y2="148.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="752" y="142.0" fill="#188a3e" text-anchor="end">intrare 54.60 (close în MBT-10)</text>
|
||||
<line x1="24" y1="62.0" x2="766" y2="62.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="62.0" x2="766" y2="62.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="752" y="56.0" fill="#1a5fb4" text-anchor="end">TP 58.90 = 1.65R</text>
|
||||
<line x1="44.0" y1="314.0" x2="44.0" y2="336.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="320.0" width="9" height="8.0" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -2,10 +2,10 @@
|
||||
<text x="24" y="72" fill="#333" style="font-weight:bold">MBT-10 — „în formare" nu e semnal (cifrele exemplului din material)</text>
|
||||
<rect x="442.3" y="199.5" width="49.0" height="155.4" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<text x="442.3" y="194.5" fill="#b06000" style="font-weight:bold">cele două zile care contează</text>
|
||||
<line x1="24" y1="210.9" x2="737" y2="210.9" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="210.9" x2="737" y2="210.9" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="723" y="204.9" fill="#555" text-anchor="end">intraday 55.30</text>
|
||||
<line x1="24" y1="319.7" x2="737" y2="319.7" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="313.7" fill="#1a5fb4">locul crimei 52.10 — structura ideii</text>
|
||||
<line x1="24.0" y1="319.7" x2="737" y2="319.7" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="313.7" fill="#1a5fb4">locul crimei 52.10 — structura ideii</text>
|
||||
<line x1="115.8" y1="124.2" x2="115.8" y2="163.3" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="109.3" y="132.7" width="13" height="20.4" fill="#188a3e"/>
|
||||
<line x1="141.8" y1="103.8" x2="141.8" y2="142.9" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -1,8 +1,8 @@
|
||||
<svg viewBox="0 0 620 510" 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">Tesla — daily: trigger MBT-10, intrare 311.21 → 333.00 = +7.0 % în 6 zile</text>
|
||||
<line x1="24" y1="425.7" x2="606" y2="425.7" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="419.7" fill="#188a3e">intrare 311.21 (close)</text>
|
||||
<line x1="24" y1="262.2" x2="606" y2="262.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="425.7" x2="606" y2="425.7" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="419.7" fill="#188a3e">intrare 311.21 (close)</text>
|
||||
<line x1="24.0" y1="262.2" x2="606" y2="262.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="592" y="256.2" fill="#1a5fb4" text-anchor="end">rezultat 333.00 = +7.0 % în 6 zile</text>
|
||||
<line x1="44.0" y1="56.0" x2="44.0" y2="64.3" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="59.8" width="9" height="1.6" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -18,7 +18,8 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Chart, Level, Mark, MA, from_closes # noqa: E402
|
||||
from svg_candles import (Chart, Level, Mark, MA, from_closes, # noqa: E402
|
||||
offset_render)
|
||||
|
||||
OUT = Path(__file__).resolve().parent / "intrarea_cazul_lui.svg"
|
||||
|
||||
@@ -119,16 +120,26 @@ svg = ch.render()
|
||||
# tăia, așa că eticheta lor stă în golul de lângă candelă (roșia: ▲ chiar sub
|
||||
# low-urile barelor 16+, peste suport; ieșirea: deasupra barelor 14-19,
|
||||
# terminată în bara 19, cu linie de legătură).
|
||||
y19 = ch._y(103.30)
|
||||
# render() ridică `top` pentru titlu și îl pune la loc: ch._y() de aici e cu
|
||||
# OFF mai sus decât desenul. Fără asta, legenda de SMA cădea peste titlu și
|
||||
# „SL 99.90" peste „suport weekly 100.00" — se vedea în SVG-ul regenerat.
|
||||
OFF = offset_render(svg, ch)
|
||||
|
||||
|
||||
def Y(p):
|
||||
return ch._y(p) + OFF
|
||||
|
||||
|
||||
y19 = Y(103.30)
|
||||
extra = [
|
||||
f'<text x="{ch._cx(15) - 5:.0f}" y="{ch._y(100.20):.1f}" fill="{RED}" '
|
||||
f'<text x="{ch._cx(15) - 5:.0f}" y="{Y(100.20):.1f}" fill="{RED}" '
|
||||
f'style="font-weight:bold">▲ roșie mare: −0.68R flotant</text>',
|
||||
f'<text x="{ch._cx(19) + 4:.0f}" y="{y19:.1f}" fill="{ORANGE}" text-anchor="end" '
|
||||
f'style="font-weight:bold">ieși aici: 102.60 = +0.23R</text>',
|
||||
f'<line x1="{ch._cx(19):.1f}" y1="{y19 + 4:.1f}" x2="{ch._cx(19):.1f}" '
|
||||
f'y2="{ch._y(cds[19].h) - 3:.1f}" stroke="{ORANGE}" stroke-width="1"/>',
|
||||
f'<text x="30" y="{ch._y(SL) + 15:.1f}" fill="{RED}">SL 99.90 (low 4 candele)</text>',
|
||||
f'<text x="24" y="{ch.top + 12:.1f}" fill="#555">'
|
||||
f'y2="{Y(cds[19].h) - 3:.1f}" stroke="{ORANGE}" stroke-width="1"/>',
|
||||
f'<text x="30" y="{Y(SL) + 15:.1f}" fill="{RED}">SL 99.90 (low 4 candele)</text>',
|
||||
f'<text x="24" y="{ch.top + OFF + 12:.1f}" fill="#555">'
|
||||
f'<tspan fill="{MA5_C}">── SMA 5</tspan> / <tspan fill="{MA10_C}">- - SMA 10</tspan> ilustrative</text>',
|
||||
]
|
||||
legend = [
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<svg viewBox="0 0 640 514" 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">Exemplu construit (fără ticker) — 15 min, suport weekly</text>
|
||||
<line x1="24" y1="110.0" x2="626" y2="110.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="104.0" fill="#1a5fb4">TP1 104.30 (1:1)</text>
|
||||
<line x1="24" y1="242.0" x2="626" y2="242.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="110.0" x2="626" y2="110.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="104.0" fill="#1a5fb4">TP1 104.30 (1:1)</text>
|
||||
<line x1="24.0" y1="242.0" x2="626" y2="242.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="612" y="236.0" fill="#188a3e" text-anchor="end">intrare la close 102.10</text>
|
||||
<line x1="24" y1="296.0" x2="626" y2="296.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="296.0" x2="626" y2="296.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="612" y="290.0" fill="#b06000" text-anchor="end">1/2 = 101.20 (B s-ar fi umplut aici)</text>
|
||||
<line x1="24" y1="368.0" x2="626" y2="368.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="362.0" fill="#777">suport weekly 100.00</text>
|
||||
<line x1="24" y1="374.0" x2="626" y2="374.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="368.0" x2="626" y2="368.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="362.0" fill="#777">suport weekly 100.00</text>
|
||||
<line x1="24.0" y1="374.0" x2="626" y2="374.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<polyline points="108.0,164.0 124.0,173.6 140.0,184.4 156.0,200.0 172.0,215.6 188.0,233.6 204.0,257.6 220.0,280.4 236.0,302.6 252.0,321.8 268.0,313.4 284.0,318.2 300.0,313.4 316.0,299.6 332.0,280.4 348.0,274.4 364.0,246.8 380.0,227.6 396.0,208.4 412.0,188.0 428.0,178.4 444.0,166.4 460.0,148.4 476.0,137.6 492.0,125.6 508.0,107.6 524.0,98.0 540.0,88.4 556.0,75.2 572.0,70.4" fill="none" stroke="#8a3ea8" stroke-width="1.5"/>
|
||||
<polyline points="188.0,198.8 204.0,215.6 220.0,232.4 236.0,251.3 252.0,268.7 268.0,273.5 284.0,287.9 300.0,296.9 316.0,301.1 332.0,301.1 348.0,293.9 364.0,282.5 380.0,270.5 396.0,254.0 412.0,234.2 428.0,226.4 444.0,206.6 460.0,188.0 476.0,173.0 492.0,156.8 508.0,143.0 524.0,132.2 540.0,118.4 556.0,106.4 572.0,98.0" fill="none" stroke="#2a8a8a" stroke-width="1.5" stroke-dasharray="5 3"/>
|
||||
<line x1="44.0" y1="120.8" x2="44.0" y2="146.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -19,7 +19,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Chart, Level, Mark, from_closes # noqa: E402
|
||||
from svg_candles import Chart, Level, Mark, from_closes, offset_render # noqa: E402
|
||||
|
||||
OUT = Path(__file__).resolve().parent / "intrarea_doua_variante.svg"
|
||||
GRI, ROSU, VERDE, PORT, ALB = "#777", "#c00", "#188a3e", "#b06000", "#1a5fb4"
|
||||
@@ -82,7 +82,16 @@ ch = Chart(candles=cds, levels=levels,
|
||||
title="Exemplu construit (fără ticker) — 15 min")
|
||||
svg = ch.render()
|
||||
svg = re.sub(r'\s*<text [^>]*></text>', "", svg) # eticheta goală a SL-ului
|
||||
y, cx = ch._y, ch._cx
|
||||
# render() ridică `top` pentru titlu și îl pune la loc: ch._y() de aici e cu
|
||||
# OFF mai sus decât desenul (aceeași capcană ca în intrarea_cazul_lui)
|
||||
OFF = offset_render(svg, ch)
|
||||
|
||||
|
||||
def y(p):
|
||||
return ch._y(p) + OFF
|
||||
|
||||
|
||||
cx = ch._cx
|
||||
ySL = y(SL)
|
||||
|
||||
extra = []
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<svg viewBox="0 0 880 474" 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">Exemplu construit (fără ticker) — 15 min</text>
|
||||
<line x1="24" y1="365.0" x2="866" y2="365.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="365.0" x2="866" y2="365.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="852" y="359.0" fill="#777" text-anchor="end">suport 100.00</text>
|
||||
<line x1="24" y1="371.0" x2="866" y2="371.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24" y1="236.0" x2="866" y2="236.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="371.0" x2="866" y2="371.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="236.0" x2="866" y2="236.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="852" y="230.0" fill="#188a3e" text-anchor="end">A: intrare la close 102.15</text>
|
||||
<line x1="24" y1="272.0" x2="866" y2="272.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="272.0" x2="866" y2="272.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="852" y="266.0" fill="#b06000" text-anchor="end">B: 1/3 = 101.55</text>
|
||||
<line x1="24" y1="290.0" x2="866" y2="290.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="290.0" x2="866" y2="290.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="852" y="284.0" fill="#b06000" text-anchor="end">B: 1/2 = 101.25</text>
|
||||
<line x1="24" y1="101.0" x2="866" y2="101.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="101.0" x2="866" y2="101.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="852" y="95.0" fill="#1a5fb4" text-anchor="end">TP1 A 104.40</text>
|
||||
<line x1="24" y1="209.0" x2="866" y2="209.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="209.0" x2="866" y2="209.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="852" y="203.0" fill="#1a5fb4" text-anchor="end">TP1 B (1/2) 102.60</text>
|
||||
<line x1="24" y1="173.0" x2="866" y2="173.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="173.0" x2="866" y2="173.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="852" y="167.0" fill="#1a5fb4" text-anchor="end">TP1 B (1/3) 103.20</text>
|
||||
<line x1="44.0" y1="128.0" x2="44.0" y2="158.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="137.0" width="9" height="12.0" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -1,12 +1,12 @@
|
||||
<svg viewBox="0 0 660 615" 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">Exemplu construit (fără ticker) — 15 min</text>
|
||||
<line x1="24" y1="556.0" x2="646" y2="556.0" stroke="#c00" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="556.0" x2="646" y2="556.0" stroke="#c00" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<text x="632" y="550.0" fill="#c00" text-anchor="end">SL 99.90</text>
|
||||
<line x1="24" y1="424.0" x2="646" y2="424.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="424.0" x2="646" y2="424.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="632" y="418.0" fill="#b06000" text-anchor="end">ordin 1/3 101.55 — neumplut</text>
|
||||
<line x1="24" y1="448.0" x2="646" y2="448.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="448.0" x2="646" y2="448.0" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="632" y="442.0" fill="#b06000" text-anchor="end">ordin 1/2 101.25 — neumplut</text>
|
||||
<line x1="24" y1="376.0" x2="646" y2="376.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="376.0" x2="646" y2="376.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="632" y="370.0" fill="#188a3e" text-anchor="end">A: close 102.15</text>
|
||||
<line x1="40.0" y1="232.0" x2="40.0" y2="272.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="35.5" y="244.0" width="9" height="16.0" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -1,12 +1,12 @@
|
||||
<svg viewBox="0 0 700 444" 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">RIOT — 3 min (TF mare 15 min în Sell)</text>
|
||||
<line x1="24" y1="56.0" x2="686" y2="56.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="56.0" x2="686" y2="56.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="50.0" fill="#c00" text-anchor="end">SL 100.85 = +0.85%</text>
|
||||
<line x1="24" y1="91.7" x2="686" y2="91.7" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="91.7" x2="686" y2="91.7" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="85.7" fill="#333" text-anchor="end">intrare 100.00 (trigger Sell)</text>
|
||||
<line x1="24" y1="127.4" x2="686" y2="127.4" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="127.4" x2="686" y2="127.4" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="121.4" fill="#1a5fb4" text-anchor="end">TP1 99.15 = 1:1</text>
|
||||
<line x1="24" y1="282.8" x2="686" y2="282.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="282.8" x2="686" y2="282.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="276.8" fill="#188a3e" text-anchor="end">ieșire 95.45 = +4.55% ≈ 1:5.3</text>
|
||||
<line x1="44.0" y1="169.4" x2="44.0" y2="200.9" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.0" y="175.7" width="10" height="16.8" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -5,9 +5,9 @@
|
||||
<svg x="8" y="52" width="372" height="321" viewBox="0 0 372 321"><polyline points="40.0,241.6 52.0,246.4 64.0,245.4 76.0,244.4 88.0,245.3 100.0,248.7 112.0,254.6 124.0,261.8 136.0,268.5 148.0,275.2 160.0,277.5 172.0,280.7 184.0,280.1 196.0,280.5 208.0,277.3 220.0,275.3 232.0,269.4 244.0,264.4 256.0,255.4 268.0,244.3 280.0,228.7 292.0,209.9 304.0,196.2 316.0,189.7 328.0,191.5 340.0,200.4 352.0,212.0 364.0,226.4" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85" stroke-dasharray="4 3"/>
|
||||
<polyline points="40.0,210.0 52.0,212.9 64.0,215.4 76.0,216.4 88.0,215.8 100.0,214.7 112.0,212.2 124.0,209.4 136.0,205.3 148.0,201.0 160.0,196.5 172.0,191.9 184.0,186.9 196.0,181.8 208.0,176.5 220.0,171.0 232.0,165.3 244.0,159.4 256.0,153.1 268.0,146.1 280.0,140.3 292.0,135.6 304.0,132.7 316.0,131.5 328.0,131.9 340.0,133.8 352.0,136.8 364.0,141.2" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85"/>
|
||||
<polyline points="40.0,178.4 52.0,179.5 64.0,185.5 76.0,188.5 88.0,186.3 100.0,180.8 112.0,169.8 124.0,157.0 136.0,142.0 148.0,126.8 160.0,115.4 172.0,103.1 184.0,93.8 196.0,83.1 208.0,75.7 220.0,66.7 232.0,61.1 244.0,54.3 256.0,50.8 268.0,48.0 280.0,51.9 292.0,61.3 304.0,69.2 316.0,73.4 328.0,72.2 340.0,67.1 352.0,61.5 364.0,55.9" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85" stroke-dasharray="4 3"/>
|
||||
<line x1="24" y1="249.8" x2="358" y2="249.8" stroke="#777" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<line x1="24" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24" y1="294.6" x2="358" y2="294.6" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="249.8" x2="358" y2="249.8" stroke="#777" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<line x1="24.0" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="294.6" x2="358" y2="294.6" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="40.0" y1="229.6" x2="40.0" y2="245.2" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="36.0" y="234.2" width="8" height="6.2" fill="#c00"/>
|
||||
<line x1="52.0" y1="235.8" x2="52.0" y2="249.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
@@ -72,8 +72,8 @@
|
||||
<svg x="398" y="52" width="372" height="321" viewBox="0 0 372 321"><polyline points="40.0,143.2 52.0,143.4 64.0,143.5 76.0,143.5 88.0,143.2 100.0,142.8 112.0,142.4 124.0,142.3 136.0,142.3 148.0,142.5 160.0,142.5 172.0,142.6 184.0,142.1 196.0,142.3 208.0,142.1 220.0,142.2 232.0,142.2 244.0,142.3 256.0,142.3 268.0,142.7 280.0,144.4 292.0,144.2 304.0,143.9 316.0,144.5 328.0,143.6 340.0,141.7 352.0,142.5 364.0,143.9" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85" stroke-dasharray="4 3"/>
|
||||
<polyline points="40.0,113.7 52.0,113.5 64.0,113.4 76.0,113.4 88.0,113.3 100.0,113.1 112.0,113.0 124.0,113.0 136.0,112.9 148.0,112.8 160.0,112.7 172.0,112.8 184.0,112.6 196.0,112.7 208.0,112.6 220.0,112.5 232.0,112.5 244.0,112.4 256.0,112.4 268.0,112.5 280.0,113.3 292.0,114.2 304.0,114.3 316.0,113.7 328.0,112.8 340.0,112.2 352.0,112.4 364.0,113.1" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85"/>
|
||||
<polyline points="40.0,84.2 52.0,83.6 64.0,83.3 76.0,83.3 88.0,83.3 100.0,83.5 112.0,83.7 124.0,83.6 136.0,83.4 148.0,83.1 160.0,82.9 172.0,82.9 184.0,83.1 196.0,83.1 208.0,83.0 220.0,82.9 232.0,82.7 244.0,82.5 256.0,82.5 268.0,82.4 280.0,82.3 292.0,84.1 304.0,84.7 316.0,82.9 328.0,82.0 340.0,82.7 352.0,82.3 364.0,82.2" fill="none" stroke="#1a5fb4" stroke-width="1.2" opacity="0.85" stroke-dasharray="4 3"/>
|
||||
<line x1="24" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24" y1="294.6" x2="358" y2="294.6" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="294.6" x2="358" y2="294.6" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="40.0" y1="107.9" x2="40.0" y2="139.9" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="36.0" y="113.3" width="8" height="21.1" fill="#188a3e"/>
|
||||
<line x1="52.0" y1="90.7" x2="52.0" y2="118.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,5 +1,5 @@
|
||||
<svg viewBox="0 0 780 594" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font-family:system-ui,sans-serif;font-size:13px">
|
||||
<svg x="8" y="48" width="380" height="414" viewBox="0 0 380 414"> <line x1="24" y1="181.1" x2="366" y2="181.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<svg x="8" y="48" width="380" height="414" viewBox="0 0 380 414"> <line x1="24.0" y1="181.1" x2="366" y2="181.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="352" y="175.1" fill="#1a5fb4" text-anchor="end">bandă 623.90</text>
|
||||
<line x1="44.0" y1="34.0" x2="44.0" y2="64.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.0" y="40.8" width="10" height="17.0" fill="#c00"/>
|
||||
@@ -31,7 +31,7 @@
|
||||
<rect x="119.0" y="318.0" width="10" height="50.6" fill="#c00"/>
|
||||
<text x="140.0" y="386.6" fill="#c00">M: TICUS -1150 (sub -1000)</text>
|
||||
<text x="124.0" y="210.1" fill="#c00" text-anchor="middle" style="font-weight:bold">M: close 623.87 < bandă 623.90</text></svg>
|
||||
<svg x="396" y="48" width="380" height="414" viewBox="0 0 380 414"> <line x1="24" y1="181.1" x2="366" y2="181.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<svg x="396" y="48" width="380" height="414" viewBox="0 0 380 414"> <line x1="24.0" y1="181.1" x2="366" y2="181.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="352" y="175.1" fill="#1a5fb4" text-anchor="end">bandă 623.90</text>
|
||||
<line x1="44.0" y1="34.0" x2="44.0" y2="64.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.0" y="40.8" width="10" height="17.0" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -2,14 +2,14 @@
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">SPY — 15 min: de unde iese stopul (fereastra de 4 candele)</text>
|
||||
<rect x="320.0" y="352.1" width="118.0" height="187.0" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<text x="320.0" y="339.1" fill="#c00" style="font-weight:bold">4 candele: trigger-ul și cele 3 dinaintea lui</text>
|
||||
<line x1="24" y1="441.1" x2="742" y2="441.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="435.1" fill="#1a5fb4">banda inferioară 623.90</text>
|
||||
<line x1="24" y1="426.1" x2="742" y2="426.1" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<line x1="24.0" y1="441.1" x2="742" y2="441.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="435.1" fill="#1a5fb4">banda inferioară 623.90</text>
|
||||
<line x1="24.0" y1="426.1" x2="742" y2="426.1" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="728" y="420.1" fill="#188a3e" text-anchor="end">intrare 623.95 = close-ul trigger-ului</text>
|
||||
<line x1="24" y1="531.1" x2="742" y2="531.1" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="525.1" fill="#c00">SL 623.60</text>
|
||||
<line x1="24" y1="56.0" x2="742" y2="56.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24" y1="562.2" x2="742" y2="562.2" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="531.1" x2="742" y2="531.1" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="525.1" fill="#c00">SL 623.60</text>
|
||||
<line x1="24.0" y1="56.0" x2="742" y2="56.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="562.2" x2="742" y2="562.2" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="64.0" y1="87.1" x2="64.0" y2="171.1" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="55.0" y="105.1" width="18" height="36.0" fill="#c00"/>
|
||||
<line x1="94.0" y1="123.1" x2="94.0" y2="216.1" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -3,12 +3,12 @@
|
||||
<text x="8" y="40" fill="#188a3e" style="font-weight:bold">DA — candelă de moment după M</text>
|
||||
<text x="396" y="40" fill="#c00" style="font-weight:bold">NU — M valid, dar fără trigger</text>
|
||||
<svg x="8" y="52" width="372" height="495" viewBox="0 0 372 495"> <rect x="274.0" y="270.5" width="24.0" height="63.5" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<line x1="24" y1="297.5" x2="358" y2="297.5" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="291.5" fill="#1a5fb4">bandă inferioară 623.90</text>
|
||||
<line x1="24" y1="354.5" x2="358" y2="354.5" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="348.5" fill="#c00">SL 623.60</text>
|
||||
<line x1="24" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24" y1="426.0" x2="358" y2="426.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="297.5" x2="358" y2="297.5" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="291.5" fill="#1a5fb4">bandă inferioară 623.90</text>
|
||||
<line x1="24.0" y1="354.5" x2="358" y2="354.5" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="348.5" fill="#c00">SL 623.60</text>
|
||||
<line x1="24.0" y1="34.0" x2="358" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="426.0" x2="358" y2="426.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="44.0" y1="58.1" x2="44.0" y2="117.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="37.0" y="69.5" width="14" height="28.5" fill="#c00"/>
|
||||
<line x1="66.0" y1="86.6" x2="66.0" y2="145.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
@@ -48,12 +48,12 @@
|
||||
</svg>
|
||||
<svg x="396" y="52" width="418" height="495" viewBox="0 0 418 495"> <rect x="274.0" y="287.6" width="68.0" height="122.4" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<text x="274.0" y="282.6" fill="#c00" style="font-weight:bold">3 candele fără trigger</text>
|
||||
<line x1="24" y1="297.5" x2="404" y2="297.5" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="291.5" fill="#1a5fb4">bandă inferioară 623.90</text>
|
||||
<line x1="24" y1="354.5" x2="404" y2="354.5" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="348.5" fill="#c00">stopul ar fi fost 623.60</text>
|
||||
<line x1="24" y1="34.0" x2="404" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24" y1="426.0" x2="404" y2="426.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="297.5" x2="404" y2="297.5" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="291.5" fill="#1a5fb4">bandă inferioară 623.90</text>
|
||||
<line x1="24.0" y1="354.5" x2="404" y2="354.5" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="348.5" fill="#c00">stopul ar fi fost 623.60</text>
|
||||
<line x1="24.0" y1="34.0" x2="404" y2="34.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="426.0" x2="404" y2="426.0" stroke="none" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="44.0" y1="58.1" x2="44.0" y2="117.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="37.0" y="69.5" width="14" height="28.5" fill="#c00"/>
|
||||
<line x1="66.0" y1="86.6" x2="66.0" y2="145.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -3,12 +3,12 @@
|
||||
<text x="24" y="44" fill="#333" style="font-weight:bold">cifrele planului nu vin din curs)</text>
|
||||
<rect x="184.5" y="306.0" width="154.0" height="128.8" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<text x="184.5" y="278.6" fill="#1a5fb4" style="font-weight:bold">M (zonă + divergență) → A (trigger) → P (plan)</text>
|
||||
<line x1="24" y1="402.8" x2="771" y2="402.8" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="396.8" fill="#1a5fb4">pivot daily 590.00 — zona (M)</text>
|
||||
<line x1="24" y1="431.6" x2="771" y2="431.6" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="402.8" x2="771" y2="402.8" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="396.8" fill="#1a5fb4">pivot daily 590.00 — zona (M)</text>
|
||||
<line x1="24.0" y1="431.6" x2="771" y2="431.6" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="757" y="425.6" fill="#c00" text-anchor="end">SL 589.40 = 0.10 sub piciorul 2 (risc 0.80)</text>
|
||||
<line x1="24" y1="354.8" x2="771" y2="354.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="348.8" fill="#188a3e">TP1 591.00 = 1:1</text>
|
||||
<line x1="24.0" y1="354.8" x2="771" y2="354.8" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="348.8" fill="#188a3e">TP1 591.00 = 1:1</text>
|
||||
<polyline points="329.0,292.3 344.0,305.2 359.0,315.6 374.0,326.6 389.0,335.0 404.0,342.2 419.0,346.9 434.0,351.7 449.0,354.0 464.0,354.1 479.0,351.2 494.0,344.7 509.0,339.9 524.0,337.5" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="530" y="332" fill="#b06000">SMA-20</text>
|
||||
<line x1="44.0" y1="74.0" x2="44.0" y2="129.2" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -2,12 +2,12 @@
|
||||
<text x="24" y="96" fill="#333" style="font-weight:bold">Pasul 6 — ieșirea: ținta 1:1, breakeven, restul pe trail (SPY 5 min, construit)</text>
|
||||
<rect x="357.0" y="213.6" width="46.0" height="60.8" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<text x="357.0" y="148.2" fill="#b06000" style="font-weight:bold">de aici stopul stă la breakeven</text>
|
||||
<line x1="24" y1="235.6" x2="741" y2="235.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<text x="30" y="229.6" fill="#188a3e">TP1 591.00 = 1:1</text>
|
||||
<line x1="24" y1="280.4" x2="741" y2="280.4" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="274.4" fill="#555">intrare 590.20 = breakeven</text>
|
||||
<line x1="24" y1="325.2" x2="741" y2="325.2" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="319.2" fill="#c00">SL inițial 589.40 (risc 0.80 = 1R)</text>
|
||||
<line x1="24.0" y1="235.6" x2="741" y2="235.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 2"/>
|
||||
<text x="30.0" y="229.6" fill="#188a3e">TP1 591.00 = 1:1</text>
|
||||
<line x1="24.0" y1="280.4" x2="741" y2="280.4" stroke="#555" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="274.4" fill="#555">intrare 590.20 = breakeven</text>
|
||||
<line x1="24.0" y1="325.2" x2="741" y2="325.2" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="319.2" fill="#c00">SL inițial 589.40 (risc 0.80 = 1R)</text>
|
||||
<line x1="200.0" y1="204.8" x2="200.0" y2="246.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="194.0" y="218.8" width="12" height="11.2" fill="#188a3e"/>
|
||||
<line x1="224.0" y1="204.8" x2="224.0" y2="258.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -2,10 +2,10 @@
|
||||
<text x="24" y="68" fill="#333" style="font-weight:bold">Pasul 2 — al doilea picior, sub nivel (SPY 5 min, exemplu construit)</text>
|
||||
<rect x="361.0" y="362.5" width="44.0" height="65.6" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<text x="361.0" y="302.6" fill="#c00" style="font-weight:bold">aici se schimbă mâna</text>
|
||||
<line x1="24" y1="389.1" x2="686" y2="389.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="383.1" fill="#1a5fb4">pivot daily 590.00</text>
|
||||
<line x1="24" y1="426.3" x2="686" y2="426.3" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="420.3" fill="#c00">SL 589.40</text>
|
||||
<line x1="24.0" y1="389.1" x2="686" y2="389.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="383.1" fill="#1a5fb4">pivot daily 590.00</text>
|
||||
<line x1="24.0" y1="426.3" x2="686" y2="426.3" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="420.3" fill="#c00">SL 589.40</text>
|
||||
<line x1="64.0" y1="76.0" x2="64.0" y2="153.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="58.0" y="91.5" width="12" height="43.4" fill="#c00"/>
|
||||
<line x1="86.0" y1="119.4" x2="86.0" y2="196.9" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -18,7 +18,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from svg_candles import Chart, Level, Zone, Arrow, from_closes # noqa: E402
|
||||
from svg_candles import Chart, Level, Zone, Arrow, from_closes, offset_render # noqa: E402
|
||||
from mdsrt_ansamblu import serie, SUPORT, TRIG, CONF, ENTRY, SL, MARJA # noqa: E402
|
||||
|
||||
OUT = Path(__file__).with_suffix(".svg")
|
||||
@@ -92,7 +92,7 @@ def panou(ch, sus_de=0.0):
|
||||
ch.top += sus_de
|
||||
svg = ch.render()
|
||||
h = float(re.search(r'viewBox="0 0 [\d.]+ ([\d.]+)"', svg).group(1))
|
||||
off = float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1)) - ch._y(ch.levels[0].price)
|
||||
off = offset_render(svg, ch)
|
||||
assert abs(off) < 40, off
|
||||
return svg[svg.index(">") + 1:svg.rindex("</svg>")].strip(), h
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">DA — trigger valid: candela apare după ce M e complet</text>
|
||||
<rect x="360.0" y="162.0" width="40.0" height="48.0" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<text x="360.0" y="123.0" fill="#188a3e" style="font-weight:bold">M complet: preț în zonă + divergență acolo</text>
|
||||
<line x1="24" y1="182.0" x2="686" y2="182.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="176.0" fill="#1a5fb4">pivot daily 590.00</text>
|
||||
<line x1="24" y1="174.0" x2="686" y2="174.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<line x1="24.0" y1="182.0" x2="686" y2="182.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="176.0" fill="#1a5fb4">pivot daily 590.00</text>
|
||||
<line x1="24.0" y1="174.0" x2="686" y2="174.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="672" y="168.0" fill="#188a3e" text-anchor="end">intrare 590.20</text>
|
||||
<line x1="24" y1="206.0" x2="686" y2="206.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="206.0" x2="686" y2="206.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="200.0" fill="#c00" text-anchor="end">SL 589.40</text>
|
||||
<line x1="170.0" y1="56.0" x2="170.0" y2="106.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="165.0" y="66.0" width="10" height="28.0" fill="#c00"/>
|
||||
@@ -46,9 +46,9 @@
|
||||
<text x="24" y="389" fill="#333" style="font-weight:bold">NU — trigger prematur: aceeași candelă, dar deasupra zonei</text>
|
||||
<rect x="300.0" y="531.0" width="20.0" height="46.0" fill="#b06000" fill-opacity="0.08" stroke="#b06000" stroke-width="1"/>
|
||||
<text x="300.0" y="526.0" fill="#b06000" style="font-weight:bold">doji corect ca formă</text>
|
||||
<line x1="24" y1="655.0" x2="686" y2="655.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="649.0" fill="#1a5fb4">pivot daily 590.00 — zona e abia aici</text>
|
||||
<line x1="24" y1="573.0" x2="686" y2="573.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="655.0" x2="686" y2="655.0" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="649.0" fill="#1a5fb4">pivot daily 590.00 — zona e abia aici</text>
|
||||
<line x1="24.0" y1="573.0" x2="686" y2="573.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="672" y="567.0" fill="#c00" text-anchor="end">stopul pus sub doji: 592.05</text>
|
||||
<line x1="170.0" y1="397.0" x2="170.0" y2="435.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="165.0" y="407.0" width="10" height="16.0" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
@@ -6,13 +6,13 @@
|
||||
<text x="24" y="54" fill="#333" style="font-weight:bold">Exemplu construit — bare de 60 de minute, 5 ședințe</text>
|
||||
<rect x="357.5" y="123.7" width="109.0" height="229.4" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<text x="357.5" y="53.0" fill="#1a5fb4" style="font-weight:bold">ziua a 4-a: pivotul mic e deja peste cel mare</text>
|
||||
<line x1="24" y1="141.0" x2="738" y2="141.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30" y="135.0" fill="#188a3e">TP1 598.00 — poziția 1</text>
|
||||
<line x1="24" y1="243.0" x2="738" y2="243.0" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="237.0" fill="#333">intrarea 592.00</text>
|
||||
<line x1="24" y1="345.0" x2="738" y2="345.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="30" y="339.0" fill="#c00">stopul 586.00</text>
|
||||
<line x1="24" y1="379.0" x2="738" y2="379.0" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<line x1="24.0" y1="141.0" x2="738" y2="141.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30.0" y="135.0" fill="#188a3e">TP1 598.00 — poziția 1</text>
|
||||
<line x1="24.0" y1="243.0" x2="738" y2="243.0" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="237.0" fill="#333">intrarea 592.00</text>
|
||||
<line x1="24.0" y1="345.0" x2="738" y2="345.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="30.0" y="339.0" fill="#c00">stopul 586.00</text>
|
||||
<line x1="24.0" y1="379.0" x2="738" y2="379.0" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<text x="724" y="373.0" fill="#777" text-anchor="end">pivot weekly (mare) 584.00</text>
|
||||
<line x1="52.0" y1="355.2" x2="52.0" y2="379.9" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="47.5" y="362.0" width="9" height="13.6" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -4,12 +4,12 @@
|
||||
<text x="712" y="370.0" fill="#1a5fb4" text-anchor="end">pivot weekly (mic)</text>
|
||||
<text x="712" y="413.8" fill="#777" text-anchor="end">pivot monthly (mare)</text>
|
||||
<text x="24" y="78" fill="#333" style="font-weight:bold">NVDA — weekly (pre-split 1:10)</text>
|
||||
<line x1="24" y1="411.6" x2="706" y2="411.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="405.6" fill="#188a3e">entry ~13.80 (după M+A)</text>
|
||||
<line x1="24" y1="465.4" x2="706" y2="465.4" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="459.4" fill="#c00">SL swing low absolut 10.63, −23%</text>
|
||||
<line x1="24" y1="352.9" x2="706" y2="352.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="346.9" fill="#1a5fb4">TP ~+25% (17.25), ~9 săpt.</text>
|
||||
<line x1="24.0" y1="411.6" x2="706" y2="411.6" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="405.6" fill="#188a3e">entry ~13.80 (după M+A)</text>
|
||||
<line x1="24.0" y1="465.4" x2="706" y2="465.4" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="459.4" fill="#c00">SL swing low absolut 10.63, −23%</text>
|
||||
<line x1="24.0" y1="352.9" x2="706" y2="352.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="346.9" fill="#1a5fb4">TP ~+25% (17.25), ~9 săpt.</text>
|
||||
<line x1="44.0" y1="86.0" x2="44.0" y2="108.1" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="92.0" width="9" height="10.2" fill="#c00"/>
|
||||
<line x1="59.0" y1="96.2" x2="59.0" y2="128.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -3,7 +3,7 @@
|
||||
<polyline points="44.0,160.3 59.0,160.3 74.0,160.3 89.0,160.3 104.0,160.3 119.0,160.3 134.0,160.3 149.0,160.3 164.0,160.3 179.0,160.3 194.0,160.3 194.0,112.8 209.0,112.8 224.0,112.8 239.0,112.8 254.0,112.8 269.0,112.8 284.0,112.8 299.0,112.8 314.0,112.8 329.0,112.8 344.0,112.8 359.0,112.8" fill="none" stroke="#b06000" stroke-width="1.8"/>
|
||||
<text x="470" y="106.8" fill="#b06000" text-anchor="end" style="font-weight:bold">pivot daily (cel MIC)</text>
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">DA — crossing (+2)</text>
|
||||
<line x1="24" y1="153.9" x2="466" y2="153.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="153.9" x2="466" y2="153.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<text x="452" y="147.9" fill="#1a5fb4" text-anchor="end">pivot weekly (cel MARE) 62.00</text>
|
||||
<circle cx="194.0" cy="136.6" r="13" fill="none" stroke="#188a3e" stroke-width="2"/>
|
||||
<text x="210.0" y="178.3" fill="#188a3e" style="font-weight:bold">crossing: 61.70 → 62.20</text>
|
||||
@@ -57,7 +57,7 @@
|
||||
<polyline points="44.0,117.6 59.0,117.6 74.0,117.6 89.0,117.6 104.0,117.6 119.0,117.6 134.0,117.6 149.0,117.6 164.0,117.6 179.0,117.6 179.0,127.1 194.0,127.1 209.0,127.1 224.0,127.1 239.0,127.1 254.0,127.1 269.0,127.1 284.0,127.1 299.0,127.1 314.0,127.1 329.0,127.1 344.0,127.1 359.0,127.1" fill="none" stroke="#b06000" stroke-width="1.8"/>
|
||||
<text x="470" y="121.1" fill="#b06000" text-anchor="end" style="font-weight:bold">pivot daily (cel MIC)</text>
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">NU — continuare/buy the dip (+1)</text>
|
||||
<line x1="24" y1="168.1" x2="466" y2="168.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<line x1="24.0" y1="168.1" x2="466" y2="168.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray=""/>
|
||||
<text x="452" y="162.1" fill="#1a5fb4" text-anchor="end">pivot weekly (cel MARE) 62.00</text>
|
||||
<line x1="44.0" y1="191.9" x2="44.0" y2="220.4" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="39.5" y="199.5" width="9" height="11.4" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -3,13 +3,13 @@
|
||||
<line x1="218.0" y1="181.8" x2="218.0" y2="243.0" stroke="#b06000" stroke-width="1.4" stroke-dasharray="3 3"/>
|
||||
<text x="224.0" y="212.4" fill="#b06000" style="font-weight:bold">stopul urcă la break-even</text>
|
||||
<text x="24" y="54" fill="#333" style="font-weight:bold">Pasul 6 — o jumătate la țintă fixă, cealaltă pe trail</text>
|
||||
<line x1="24" y1="141.0" x2="706" y2="141.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30" y="135.0" fill="#188a3e">TP1 598.00 = intrarea + 1R</text>
|
||||
<line x1="24" y1="181.8" x2="706" y2="181.8" stroke="#b06000" stroke-width="1.5" stroke-dasharray="1 3"/>
|
||||
<text x="30" y="175.8" fill="#b06000">595.60 = 60 % din drum</text>
|
||||
<line x1="24" y1="243.0" x2="706" y2="243.0" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="237.0" fill="#333">intrarea 592.00</text>
|
||||
<line x1="24" y1="345.0" x2="706" y2="345.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<line x1="24.0" y1="141.0" x2="706" y2="141.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="2 3"/>
|
||||
<text x="30.0" y="135.0" fill="#188a3e">TP1 598.00 = intrarea + 1R</text>
|
||||
<line x1="24.0" y1="181.8" x2="706" y2="181.8" stroke="#b06000" stroke-width="1.5" stroke-dasharray="1 3"/>
|
||||
<text x="30.0" y="175.8" fill="#b06000">595.60 = 60 % din drum</text>
|
||||
<line x1="24.0" y1="243.0" x2="706" y2="243.0" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="237.0" fill="#333">intrarea 592.00</text>
|
||||
<line x1="24.0" y1="345.0" x2="706" y2="345.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="692" y="339.0" fill="#c00" text-anchor="end">stopul inițial 586.00</text>
|
||||
<line x1="58.0" y1="299.2" x2="58.0" y2="334.8" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="50.5" y="304.2" width="15" height="25.5" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -7,7 +7,7 @@
|
||||
<text x="42.5" y="256.8" fill="#c00" style="font-weight:bold">pivotul mic e SUB cel mare: M neîndeplinit, nu cauți long</text>
|
||||
<rect x="357.5" y="54.0" width="214.0" height="265.7" fill="#188a3e" fill-opacity="0.08" stroke="#188a3e" stroke-width="1"/>
|
||||
<text x="357.5" y="49.0" fill="#188a3e" style="font-weight:bold">pivotul mic e PESTE cel mare: M îndeplinit</text>
|
||||
<line x1="24" y1="341.7" x2="706" y2="341.7" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<line x1="24.0" y1="341.7" x2="706" y2="341.7" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<text x="692" y="335.7" fill="#777" text-anchor="end">pivot weekly (mare) 584.00 — nu se mișcă toată săptămâna</text>
|
||||
<line x1="52.0" y1="320.8" x2="52.0" y2="342.5" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="47.5" y="326.7" width="9" height="12.0" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -30,7 +30,7 @@ import re
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Candle, from_closes # noqa: E402
|
||||
from svg_candles import Candle, from_closes, offset_render # noqa: E402
|
||||
|
||||
BARE_ZI = 7 # bare de 60 min într-o ședință
|
||||
ZILE = 5
|
||||
@@ -223,8 +223,7 @@ def offset(svg, ch):
|
||||
prima linie de Level desenată, ca ce injectăm pe urmă să cadă exact peste
|
||||
candele (bug real: liniile de pivot cu 22 px mai sus decât candelele).
|
||||
"""
|
||||
y = float(re.search(r'<line x1="24" y1="([\d.]+)"', svg).group(1))
|
||||
return y - ch._y(ch.levels[0].price)
|
||||
return offset_render(svg, ch)
|
||||
|
||||
|
||||
def trepte(ch, valori, off):
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<text x="24" y="54" fill="#333" style="font-weight:bold">Pasul 5 — numeri 4 bare înapoi de la trigger și iei cea mai joasă</text>
|
||||
<rect x="465.5" y="182.1" width="81.0" height="105.6" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<text x="465.5" y="53.0" fill="#1a5fb4" style="font-weight:bold">cele 4 bare pe care le numeri</text>
|
||||
<line x1="24" y1="195.7" x2="706" y2="195.7" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="195.7" x2="706" y2="195.7" stroke="#333" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="692" y="189.7" fill="#333" text-anchor="end">intrarea 592.00</text>
|
||||
<line x1="24" y1="279.7" x2="706" y2="279.7" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="30" y="273.7" fill="#c00">stopul din regulă 586.00 — 1R = 6.00</text>
|
||||
<line x1="24" y1="363.7" x2="706" y2="363.7" stroke="#b06000" stroke-width="1.5" stroke-dasharray="2 4"/>
|
||||
<line x1="24.0" y1="279.7" x2="706" y2="279.7" stroke="#c00" stroke-width="1.5" stroke-dasharray="6 3"/>
|
||||
<text x="30.0" y="273.7" fill="#c00">stopul din regulă 586.00 — 1R = 6.00</text>
|
||||
<line x1="24.0" y1="363.7" x2="706" y2="363.7" stroke="#b06000" stroke-width="1.5" stroke-dasharray="2 4"/>
|
||||
<text x="692" y="357.7" fill="#b06000" text-anchor="end">swing low absolut 580.00</text>
|
||||
<line x1="56.0" y1="288.1" x2="56.0" y2="308.4" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="50.5" y="293.7" width="11" height="11.2" fill="#c00"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -3,7 +3,7 @@
|
||||
<text x="442.0" y="305.4" fill="#1a5fb4" text-anchor="middle" style="font-weight:bold">pivot daily (mic) 587.13</text>
|
||||
<text x="90.0" y="384.0" fill="#1a5fb4" style="font-weight:bold">pivot daily (mic) 583.20</text>
|
||||
<text x="24" y="54" fill="#333" style="font-weight:bold">Pasul 4 — aceeași linie de pivot, trei bare, un singur trigger</text>
|
||||
<line x1="24" y1="353.0" x2="709" y2="353.0" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<line x1="24.0" y1="353.0" x2="709" y2="353.0" stroke="#777" stroke-width="1.5" stroke-dasharray="8 4"/>
|
||||
<text x="695" y="347.0" fill="#777" text-anchor="end">pivot weekly (mare) 584.00</text>
|
||||
<line x1="61.1" y1="326.0" x2="61.1" y2="349.0" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
<rect x="53.6" y="331.0" width="15" height="10.0" fill="#188a3e"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -21,7 +21,8 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Chart, Level, Arrow, Zone, MA, from_closes # noqa: E402
|
||||
from svg_candles import (Chart, Level, Arrow, Zone, MA, from_closes, # noqa: E402
|
||||
offset_render)
|
||||
|
||||
OUT = Path(__file__).resolve().parent / "selectia_ansamblu.svg"
|
||||
|
||||
@@ -128,9 +129,7 @@ svg = ch.render()
|
||||
|
||||
# ---------------------------------------------------------------- linia verticală de predare
|
||||
# offsetul intern al randării, citit din prima linie de Level desenată
|
||||
m_off = re.search(r'<line x1="24" y1="([\d.]+)"', svg)
|
||||
assert m_off, "nu găsesc linia primului Level, din care citesc offsetul pe y"
|
||||
OFF = float(m_off.group(1)) - ch._y(levels[0].price)
|
||||
OFF = offset_render(svg, ch)
|
||||
# render() mută și `left`; offsetul pe x se citește din dreptunghiul primei zone
|
||||
m_dx = re.search(r'<rect x="([\d.]+)"[^>]*fill="' + RED + r'"', svg)
|
||||
assert m_dx, "nu găsesc dreptunghiul primei zone, din care citesc offsetul pe x"
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<rect x="188.3" y="146.0" width="184.0" height="317.7" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<text x="188.3" y="141.0" fill="#c00" style="font-weight:bold">1. downtrend — de asta apare în scaner</text>
|
||||
<rect x="368.3" y="334.3" width="139.0" height="176.9" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<line x1="24" y1="506.1" x2="822" y2="506.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="500.1" fill="#1a5fb4">suport monthly 355.48</text>
|
||||
<line x1="24" y1="265.9" x2="822" y2="265.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="506.1" x2="822" y2="506.1" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="500.1" fill="#1a5fb4">suport monthly 355.48</text>
|
||||
<line x1="24.0" y1="265.9" x2="822" y2="265.9" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="808" y="259.9" fill="#1a5fb4" text-anchor="end">pivot monthly 383.74</text>
|
||||
<polyline points="482.8,365.9 497.8,375.2 512.8,382.1 527.8,387.0 542.8,389.8 557.8,390.5 572.8,389.2 587.8,385.5 602.8,379.6 617.8,371.3 632.8,360.3 647.8,346.1 662.8,329.2" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="669" y="323" fill="#b06000">SMA-20</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -2,14 +2,14 @@
|
||||
<text x="24" y="48" fill="#333" style="font-weight:bold">HIG — daily (Sell Doji + Bear Reversal, RVOL 200%)</text>
|
||||
<rect x="281.8" y="121.6" width="64.0" height="52.0" fill="#c00" fill-opacity="0.08" stroke="#c00" stroke-width="1"/>
|
||||
<text x="281.8" y="116.6" fill="#c00" style="font-weight:bold">ce l-a scos în față din cele 16 rezultate</text>
|
||||
<line x1="24" y1="56.0" x2="723" y2="56.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="56.0" x2="723" y2="56.0" stroke="#777" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="709" y="50.0" fill="#777" text-anchor="end">rezistenta 84.50</text>
|
||||
<line x1="24" y1="96.0" x2="723" y2="96.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<line x1="24.0" y1="96.0" x2="723" y2="96.0" stroke="#c00" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="709" y="90.0" fill="#c00" text-anchor="end">SL 82.00</text>
|
||||
<line x1="24" y1="158.4" x2="723" y2="158.4" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="152.4" fill="#1a5fb4">intrare short 78.10</text>
|
||||
<line x1="24" y1="256.0" x2="723" y2="256.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="250.0" fill="#188a3e">TP 72.00</text>
|
||||
<line x1="24.0" y1="158.4" x2="723" y2="158.4" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="152.4" fill="#1a5fb4">intrare short 78.10</text>
|
||||
<line x1="24.0" y1="256.0" x2="723" y2="256.0" stroke="#188a3e" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="250.0" fill="#188a3e">TP 72.00</text>
|
||||
<polyline points="426.3,129.0 441.3,132.5 456.3,136.3 471.3,141.0 486.3,146.7 501.3,151.8 516.3,158.1 531.3,165.4 546.3,173.7 561.3,182.8 576.3,192.7" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="582" y="187" fill="#b06000">SMA-20</text>
|
||||
<line x1="141.3" y1="120.8" x2="141.3" y2="137.6" stroke="#1a1a1a" stroke-width="1.2"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -21,7 +21,8 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, "/workspace/atm-curs-dl")
|
||||
from svg_candles import Chart, Level, Arrow, Zone, MA, from_closes # noqa: E402
|
||||
from svg_candles import (Chart, Level, Arrow, Zone, MA, from_closes, # noqa: E402
|
||||
y_niveluri)
|
||||
|
||||
OUT = Path(__file__).resolve().parent / "selectia_proximitate.svg"
|
||||
|
||||
@@ -112,8 +113,8 @@ ch = Chart(
|
||||
svg = ch.render()
|
||||
|
||||
# eticheta benzii, pusă în interiorul ei, în stânga
|
||||
m_band = re.findall(r'<line x1="24" y1="([\d.]+)"', svg)
|
||||
y_banda_sus, y_suport = float(m_band[1]), float(m_band[0])
|
||||
m_band = y_niveluri(svg)
|
||||
y_banda_sus, y_suport = m_band[1], m_band[0]
|
||||
assert y_suport > y_banda_sus, "banda e desenată invers"
|
||||
svg = svg.replace("</svg>",
|
||||
f'<text x="230" y="{(y_banda_sus + y_suport) / 2 + 4:.1f}" fill="{BLUE}" '
|
||||
@@ -126,9 +127,9 @@ svg, n = re.subn(r'(<text x="\d+" y=")([\d.]+)(" fill="#b06000">SMA-20</text>)',
|
||||
assert n == 1, f"eticheta SMA-20: {n} potriviri"
|
||||
|
||||
# liniile nu au voie să cadă pe marginea cadrului
|
||||
m_sup = re.findall(r'<line x1="24" y1="([\d.]+)"', svg)
|
||||
m_sup = y_niveluri(svg)
|
||||
assert m_sup, "nu găsesc liniile de nivel"
|
||||
y_sup = float(m_sup[0])
|
||||
y_sup = m_sup[0]
|
||||
m_vb = re.search(r'viewBox="0 0 (\d+) (\d+)"', svg)
|
||||
assert m_vb
|
||||
h_svg = int(m_vb.group(2))
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<svg viewBox="0 0 683 610" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;font:12px sans-serif">
|
||||
<text x="24" y="100" fill="#333" style="font-weight:bold">Cât de aproape de suport e prețul — daily, exemplu construit</text>
|
||||
<rect x="58.4" y="294.2" width="484.0" height="37.4" fill="#1a5fb4" fill-opacity="0.08" stroke="#1a5fb4" stroke-width="1"/>
|
||||
<line x1="24" y1="331.6" x2="669" y2="331.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30" y="325.6" fill="#1a5fb4">suport monthly 48.00</text>
|
||||
<line x1="24" y1="294.2" x2="669" y2="294.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="5 3"/>
|
||||
<line x1="24.0" y1="331.6" x2="669" y2="331.6" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="30.0" y="325.6" fill="#1a5fb4">suport monthly 48.00</text>
|
||||
<line x1="24.0" y1="294.2" x2="669" y2="294.2" stroke="#1a5fb4" stroke-width="1.5" stroke-dasharray="5 3"/>
|
||||
<text x="655" y="288.2" fill="#1a5fb4" text-anchor="end">suport + 3 % = 49.44</text>
|
||||
<polyline points="352.9,222.8 367.9,231.8 382.9,239.7 397.9,247.4 412.9,254.9 427.9,261.4 442.9,267.8 457.9,273.7 472.9,278.8 487.9,283.6 502.9,288.2 517.9,291.8 532.9,294.5" fill="none" stroke="#b06000" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||||
<text x="539" y="272.0" fill="#b06000">SMA-20</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |