Login Page - Create Account

Support Board


Date/Time: Sat, 01 Mar 2025 10:40:25 +0000



Post From: Drawing Price Retracements with ACSIL

[2021-09-24 21:25:28]
User404097 - Posts: 10
Hi, I am trying to systematically draw a price retracement as it is happening real time and updating it when a new bar closes. Currently, when I set my beginValue = sc.Low/High[startIndex], it properly puts my 100% line to the Low/High of the candle (bottom/Top of the wick). However the problem arises when I update my EndValue to be the lastVisibleBar's sc.Low/High. It is putting my 0% line at the sc.Low/High of the actual bar and not the wick. Im confused because it seems like I am missing something very trivial but cannot figure out why my EndValue is a tick or 2 too low/high on every retracement that my code draws.

I am drawing retracements for long in one custom study and short in another to keep code cleaner and to avoid problems when I need to draw both long/short at the same time.

Any help would be greatly appreciated, thanks.