It's not GRAPH that is the problem, the code is correct. I'm thinking of a copy/paste that introduced an invisible character and bugged the interpreter. Try with a new code and retype everything by hand to see 🙂
You have put your backtest code in the indicator code editor, not the probacktest/proorder editor (hint 1: the editor doesn’t like the word “buy” just like the indicator editor would not like it; and hint2: error window title is “erreur dans la programmation de l’indicateur”, while probacktest error window title would just be “erreur”)
PS: it’s a double post but we’ll leave it here… it would have been better to wait for an answer in the topic where the question was already asked, thank you
Trading on leveraged financial instruments may expose you to risk of loss greater than your deposits and is only suitable for experienced clients with the financial means to bear such risk. Trading on foreign exchange instruments (Forex) and contracts for difference (CFDs) is highly speculative and particularly complex and comes with a high level of risk due to leverage. You must ensure that you understand how these instruments work and that you can afford to take the high risk of losing your money. No information on this site is investment advice or a solicitation to buy or sell any financial instruments.