Compilation errors '-' - illegal operation use '-'
-
hello community, after a few months i did some rebuilding and wanted to compile. source code with metaeditor and online compiling throws up errors. would be great if someone has a solution or just ignore it
Compilation errors
'-' - illegal operation use
'-' - illegal operation usesourcecode
public: /* The main method */
string execute()
{
return v::avg_open_price-DoubleToString(SymbolInfoInteger(_Symbol,SYMBOL_SPREAD),2);
}
}; -
Recently I've been using ChatGpt to help fix my compiling errors. Worked great. Sometimes it's a trial and error with the AI , but I kept posting new error codes and it kept giving me the fixes . Plus it explains why the error occurred and where in the code to place the corrected code. Like commuting with a teacher. You can copy and paste the errors from MetaEditor into the chat window
Also, there is a limited number of characters you can place in one message. I put FXDreama code into an online chat prompt splitter and then posted the individual sections so Chat GPT could read the full code. The amazing thing is that ChatGPT kept track of 1 of 7, 2 of 7 etc., knew when I was done an then asked what I wanted. That's when I posted the errors, which were from me manually adjusting and/or adding code
-
thank u for that but even chatgpt throws the random explanation. just happened with the new metatrader update and the update to their package. syntax us right just dont know why it throws the error
-

-
when i use - instead of + it gives the error. worked in the past. the goal was to get a breakeven price include the spread.
-
Definitely you should let the admin know.
-
@akallai86 Just to make sure, have you already tried to deduct or add the symbol spread from sell_open_price without converting it into a string value?
-
@fxpim no thats what im trying to do to deduct the spread. when i use + instead of - it works the moment i want to deduct it throws the error
-
@akallai86 I mean, have you already tried to deduct the spread as a number from sell_open_price instead of deducting it as a text?