Hello, i'm programming a trading robot, i have this concern, HELP ME!!:)
if (operacion <=20) \\Not =<
Please don't try to fool people to open your post with a Title like that. It is childish.
Even if you manage to complete your "trading robot" it will be huge and bloated. You have the worst 5-line MQL code of all times. I urge you to first, learn how to code in MQL5.
- The IF line tells me that you don't even have a background in any serious programming language. The standard Comparison operator is ">=", not "=<".
- On every single tick on the platform you are instantiating again, and again, and again, the variable "arriesgue".
- Worst than that you are calling in this very same way AccountInfoDouble().
- And, the same goes for the Print()...
Don't try to use any price or server related functions in OnInit (or on load,) as there may be no connection/chart yet:
- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- New tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
I have edited your title as it is a blatant attempt to get people to contact you. I will also edit the title in your other topic.
Don't make false claims as it is obvious from your lack of coding experience that your title was untrue.