- whats the problem
- Trailingstop EA won't work
- Trailing Stop in EA does not get activated on VPS
My ea has 2 sets conditions for both buy and sell, uses martingale, Break even and trailing stop. They all work as written on the tester but on the Demo, it doesnt even move. My conditions are: Buy and break even and if previous buy on the next candle open Buy using martingale then trail. For those rude experienced programmers I'd appreciate if you respond with humanity. Where could the problem be? I dont even know which parts of code should I put but there
without more of the code i can only make suggestions where to look in the limited parts of the code that is posted, but things i notice is that there is no explanation of numTickets or maybe numTickets should be replaced with i ? Only other suggestion i can make is that maybe a break is in the wrong place?
without more of the code i can only make suggestions where to look in the limited parts of the code that is posted, but things i notice is that there is no explanation of numTickets or maybe numTickets should be replaced with i ? Only other suggestion i can make is that maybe a break is in the wrong place?
numTickets has been explained at the beginning of the onTick and the break exits the buy on candle open Loop. Thanks for responding
you ask for help regarding the Trail stop, but you have not posted the Trail stop function. The cause of the issue will probably lie in that function.
There is the function
sorry for late response, but it looks too advanced for me :) however i did notice that there is a couple variables named currentTake, lines 101 and 159, are commented out/hidden, but they are not in the rest of the code, maybe there is something in that?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use