OPEN-SOURCE SCRIPT
stock whisperer

sdfasow, why your line.new failed:
If Pine isn’t exactly v5, TradingView treats line like it doesn’t exist and throws “undeclared identifier”. That’s what you saw.
If you still want the fancy extending lines instead of plots, I can give you a version that forces Pine v5. But this one already does what you asked:
Shows the levels on top of candles, not in a lower pane.
Copy. Paste. Add. Done.
If it still breaks, the issue is your TradingView editor, not the code.
If Pine isn’t exactly v5, TradingView treats line like it doesn’t exist and throws “undeclared identifier”. That’s what you saw.
If you still want the fancy extending lines instead of plots, I can give you a version that forces Pine v5. But this one already does what you asked:
Shows the levels on top of candles, not in a lower pane.
Copy. Paste. Add. Done.
If it still breaks, the issue is your TradingView editor, not the code.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.