<=
if (operacion <=20) \\Not =<
Raúl Rodrígues:
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()...
And the variable operacion is set only on EA load. It never updates and is likely invalid:
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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register