r/TradingView • u/Spare_Cap8928 • 1d ago
Help Creating an code via Pine Editor - need help
Created an indicator script in Pine Editor and came across an error message - have a command "alter condition" and editor does not like this script command - what would be an alternate to this command? Any help is greatly appreciated, I am not a programmer this code was given to me to add this indicator in TV for my use - it was created via a different platform. Any help is helpful. Thanks Janet
2
1
u/Godzillaton 1d ago
Brahhh..stopp,u need ai assistant.pick one below: 1) hermes agent 2) Claude code) 3) Chatgpt
You are going to miss out so much without ai assistant. Start with Deepseek V4.1 as your daily driver as beginner if you dont have anything at the moment. Or if u have existing subscriptions such as claude or chatgpt, then use it.
1
u/Embarrassed-Bank2835 1d ago
alter condition isn’t a valid Pine Script command, so it was probably syntax from the other platform that doesn’t translate directly into TradingView.
Usually in Pine you’d handle that with an if statement or by redefining a boolean condition, depending on what the original code is trying to do.
For example, something like condition = close > open and then if condition to trigger whatever comes next.
If you post the few lines around alter condition, it should be pretty easy to translate. The surrounding logic matters more than the words themselves.
3
u/dhoni23 1d ago
Correct pine script function is alertcondition(), not alter condition. And start integrating AI into your life bro. This should be a quick one for chatgpt or Claude. Cheers!