לוחצים על חבילה כדי להוסיף אותה לרשימה. לחיצה נוספת מסירה.
מחירים וגרפים מ-TradingView. בחלק מהבורסות (כולל ת"א) הנתונים מעוכבים. סמל שלא מופיע ברשימת המחירים עדיין זמין בגרף.
{ try{ frame.contentWindow.location.hash=hash; }catch(e){} },{once:true}); frame.srcdoc=lessonsHTML(); }
else { try{ frame.contentWindow.location.hash=h; }catch(e){} }
}
const btn=document.getElementById("learnBtn"),panel=document.getElementById("learnPanel"),
frame=document.getElementById("learnFrame"),grip=document.getElementById("learnGrip"),gEl=document.getElementById("gauges");
const ss={get:k=>{try{return localStorage.getItem(k)}catch(e){return null}},set:(k,v)=>{try{localStorage.setItem(k,v)}catch(e){}}};
const w=ss.get("learn-width"); if(w) document.documentElement.style.setProperty("--lw",w+"px");
let tab=ss.get("learn-tab")||"gauges", hash="#learn";
function go(t,h){
tab=t; ss.set("learn-tab",t);
panel.querySelectorAll("[data-lt]").forEach(b=>b.setAttribute("aria-selected",b.dataset.lt===t));
gEl.hidden=t!=="gauges"; frame.hidden=t==="gauges";
if(t!=="gauges"){ hash=h||(t==="practice"?"#practice":"#learn"); showLessons(hash); }
else paint(true);
}
function open(){ panel.hidden=false; document.body.classList.add("learn-on"); btn.setAttribute("aria-expanded","true"); btn.textContent="סגור מסך למידה"; ss.set("learn-open","1"); go(tab); }
function close(){ panel.hidden=true; document.body.classList.remove("learn-on"); btn.setAttribute("aria-expanded","false"); btn.textContent="📘 מסך למידה ותרגול"; ss.set("learn-open","0"); btn.focus(); }
btn.addEventListener("click",()=>panel.hidden?open():close());
document.getElementById("learnClose").addEventListener("click",close);
panel.querySelectorAll("[data-lt]").forEach(b=>b.addEventListener("click",()=>go(b.dataset.lt)));
document.getElementById("learnPop").addEventListener("click",()=>{
const W=Math.round(screen.availWidth/2),H=screen.availHeight;
const win=window.open("","learn-window",`width=${W},height=${H},left=0,top=0`);
if(win){ win.document.open(); win.document.write(lessonsHTML()); win.document.close(); try{ win.location.hash=(tab==="practice"?"#practice":"#learn"); }catch(e){} }
if(win&&tab!=="gauges") close();
});
grip.addEventListener("pointerdown",e=>{
e.preventDefault(); grip.setPointerCapture(e.pointerId); document.body.classList.add("learn-drag");
const move=ev=>{ const nw=Math.min(Math.max(ev.clientX,320),window.innerWidth-360); document.documentElement.style.setProperty("--lw",nw+"px"); };
const up=()=>{ grip.releasePointerCapture(e.pointerId); document.body.classList.remove("learn-drag");
ss.set("learn-width",parseInt(getComputedStyle(panel).width)); grip.removeEventListener("pointermove",move); grip.removeEventListener("pointerup",up); };
grip.addEventListener("pointermove",move); grip.addEventListener("pointerup",up);
});
/* ---------- שעונים ---------- */
const TRL={"1":"עולה","-1":"יורדת","0":"דשדוש"},
EVL={sup:"דחייה מתמיכה",bup:"פריצה למעלה",res:"דחייה מהתנגדות",bdn:"שבירה למטה",mid:"באמצע טווח"},
VC={high:"גבוה מהממוצע",norm:"רגיל",low:"נמוך"}, VP={down:"הולך וקטן",norm:"רגיל",up:"הולך וגדל"},
SU={retest:"פריצה ובדיקה חוזרת",reject:"דחייה מאזור",pullback:"תיקון במגמה",none:"אין סטאפ"};
const NAMES={X:"התנהגות מחיר",Y:"ווליום",A:"סטאפ",B:"ניהול עסקה"};
const LINKS={X:[["מגמה",1],["תמיכה והתנגדות",7],["יחסי כוחות",3]],Y:[["ווליום",5],["פרופיל נפח",6]],A:[["החלטת כניסה",8],["פאזה B",4]],B:[["סטופ וגודל עסקה",9],["ניהול עסקה",10]]};
const fm=(n,d=2)=>isFinite(n)?n.toLocaleString("en-US",{maximumFractionDigits:d}):"–";
function gauge(v){
const P=a=>[60+50*Math.cos(a*Math.PI/180),60-50*Math.sin(a*Math.PI/180)];
const arc=(a1,a2,c)=>{const[x1,y1]=P(a1),[x2,y2]=P(a2);return ``};
let needle="";
if(v!==null&&v!==undefined){const a=v===1?30:v===-1?150:90, r=a*Math.PI/180;
needle=``;}
else needle=`?`;
return ``;
}
function info(k){
const s=(typeof st!=="undefined")?st:{}, v=(typeof scores!=="undefined")?scores[k]:null;
let txt="",tip="";
if(k==="X"){
txt=s.trend!==undefined||s.event?`מגמה: ${TRL[s.trend]||"?"} · באזור: ${EVL[s.event]||"?"}`:"";
if(v===null) tip="בחר את המגמה בטווח הגדול ומה קרה באזור.";
else if(v===0) tip=s.event==="mid"?"באמצע טווח אין יתרון. מחכים לאזור מפתח.":"המגמה והאירוע מצביעים לכיוונים שונים. לא נכנסים נגד המגמה.";
else tip="המגמה והאירוע מסכימים.";
}
if(k==="Y"){
txt=s.volConf||s.volPull?`בנר האישור: ${VC[s.volConf]||"?"} · בתנועה אל האזור: ${VP[s.volPull]||"?"}`:"";
if(v===null) tip=(typeof scores!=="undefined"&&scores.X===null&&s.volConf&&s.volPull)?"קודם ממלאים את X. הווליום בודק אם הוא מאשר אותו.":"בחר את הווליום בנר האישור ובתנועה אל האזור.";
else if(v===0) tip="הווליום לא מאשר. מחפשים ווליום גבוה באישור, וקטן בתנועה אל האזור.";
else tip="הכסף מאשר את מה שראית בגרף.";
}
if(k==="A"){
txt=s.setup?`${SU[s.setup]}${s.setupDir?` · ${s.setupDir==="1"?"לונג":"שורט"}`:""}${s.trigger?` · טריגר: ${s.trigger==="yes"?"קרה":"עוד לא"}`:""}`:"";
if(v===null) tip="בחר סטאפ, כיוון, והאם הטריגר קרה.";
else if(v===0) tip=s.setup==="none"?"אין סטאפ מהשיטה, ולכן אין עסקה.":"הטריגר עוד לא קרה. מחכים לסגירת נר.";
else tip="יש סטאפ, והטריגר קרה.";
}
if(k==="B"){
const b=(typeof bInfo!=="undefined")?bInfo:null;
txt=b?`יחס 1:${fm(b.rr)} · סיכון בפועל ${fm(b.riskMoney,0)}`:"";
if(v===null) tip="מלא כניסה, סטופ ויעד.";
else if(v===0) tip=(b&&b.problems&&b.problems.length)?b.problems.join(". ")+".":"התוכנית לא עומדת בכללים.";
else tip="יחס של 1:2 לפחות, וסיכון עד 2%.";
}
return {v,txt,tip};
}
let sig="";
function paint(force){
if(panel.hidden||tab!=="gauges") return;
const sc=(typeof scores!=="undefined")?scores:{}, s=(typeof st!=="undefined")?st:{}, b=(typeof bInfo!=="undefined")?bInfo:null;
const now=JSON.stringify([sc,s,b&&[b.rr,b.problems,b.riskMoney]]);
if(!force&&now===sig) return; sig=now;
const dec=(typeof decision!=="undefined")?decision:null;
const dTxt={long:"LONG",short:"SHORT",none:"אין עסקה"}[dec]||"?";
const why=document.getElementById("why")?.textContent||"";
let h=`
${dTxt}
${why}
`;
for(const k of ["X","Y","A","B"]){
const {v,txt,tip}=info(k);
const stt=v===null?["empty","עוד לא מולא"]:v===1?["long","לונג"]:v===-1?["short","שורט"]:["neutral","ניטרלי"];
h+=`