Good morning, in this code that I have I want to draw a line exactly where the price crossed the Parabolic SAR, but it’s only letting me draw a circle. Sometimes it does let me draw a line, but not at the same level as the circle, which is where I want the line. Best regards. `_SECTION_BEGIN("PE Rebasado Exacto Corregido");
// --- PARÁMETROS ---
sarStep = 0.02;
sarMax = 0.2;
// --- LÓGICA DE TENDENCIA (SAR) ---
psar = SAR(sarStep, sarMax);
C1 = C > psar;
C2 = C < psar;
// Detectamos el cruce exacto
reversal = (C1 AND NOT Ref(C1, -1)) OR (C2 AND NOT Ref(C2, -1));
// CAPTURA DEL PUNTO EXACTO (Esto es lo que usa tu PlotShapes)
valorRuptura = ValueWhen(reversal, Ref(psar, -1));
barraRuptura = ValueWhen(reversal, BarIndex());
// Tu punto de referencia original
PlotShapes(IIf(reversal, shapeSmallCircle, shapeNone), colorBlack, 0, valorRuptura);
Yes, that’s why I’m learning to program, and sometimes I use AI when I find myself without a solution. I’ve already tried drawing the line instead of the circle in the code I sent you, but the line is always drawn above the circle and I feel incapable of fixing it. I want to draw a line where the price crosses the Parabolic SAR, and for it to accumulate and stay fixed at that point until the price crosses the PSAR again. I don’t know if you could help me.
Best regards.