Hi,
I'm still a beginner and maybe my answer won't help you, but since you're talking about the SL, isn't it a problem of minimum stop loss distance because some brokers ask for a minimum distance? with this fonction
int StopsLevel() const
Documentation sur MQL5: Bibliothèque Standard / Classes pour le Trading / CSymbolInfo / StopsLevel
- www.mql5.com
StopsLevel - CSymbolInfo - Classes pour le Trading - Bibliothèque Standard - Référence MQL5 - Référence sur le langage de trading algorithmique/automatisé pour MetaTrader 5
Even if your EA is not for the Market, you should still apply these checks in your own code. So read and apply the following to your code ...
The checks a trading robot must pass before publication in the Market
MetaQuotes, 2016.08.01 09:30
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
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
Hi everyone I am seeking help on something I do not understand (code at the end of page). When I using this code with the parameters I filled in, and I fill in the desired time for trade 1, it works totally fine. But whenever I change the parameters, sometimes it works and sometimes it does not seem to respond at all. For example if I change the stoploss into 40 it does not work (it does not give an error but just does not place the trades) but when I change takeprofit into 300 it works. Does anyone have any clue why this happens?
I am using this code: