WriteIf( Highest( doubletop ) == 1, "detected some possible
double top patterns for " + Name() + "\nLook for green arrows on the price
chart.", "There are no double top patterns for " + Name() );
After applying same it became error, is there a way to ignore same completely
I understand the solution is to remove the new line, but I had multiple of these after cloning from my version control repository,
I suggested to chatgpt regex like "([^"]*?)\r?\n\s*([^"]*?)"
I.e found and replace with regex match group
But It seems it's not very generic and I don't want to make it more generic to match codes with no issues
If anyone have any suggestion, It would be much appreciated
Has \n in the original code been replaced by new line character OR has it been replaced with new line and the \n in actual code is also present?
String literals should be in one line in AFL. ( backslash doesn't delimit in AFL editor )
// this type would be OK
"detected some possible double top patterns for " + Name() +
"\nLook for green arrows on the price chart."
// but not this
"detected some possible double top
patterns for " + Name() +
"\nLook for green arrows on the
price chart."
You could use Notepad++ but your sample is not consistent. Post something realistic.
The solution would be to end that line with quotes and add + and opening quote in next line
or opening and ending quotes in same line
But I had same on lots of formula, is there any way to automate same or ignore it.
@Tomasz Thanks solved by setting SetOption("WarningLevel", x );
Now my automation plan would be to replace all formula files first line with same, or an include file for future use if any other option needed.