Edit: I am not even sure what information to provide here since I cant narrow down the issue at all as it tests just fine, as I said, on one system but not the other. Manually confirming that the stop should be balanced as well yielded no result.
If you need help with your code, then you will have to show your code (as well as any relevant output from both the Experts and Journal log).
Otherwise, consider adding "prints" to your code so that you can track and debug it yourself.
Hi Fernando,
Thanks for getting back to me. It took a bit of time but I was able to copy over both log files and zip up my entire codebase and put it on google drive. The EA file is called EA_IWBDT. You can find the google drive https://drive.google.com/drive/folders/1Hq5CMPMw_CaHW3sOyvdoq0weJ8K36njj?usp=sharing
If you would prefer I paste the code to pastebin or something instead let me know.
Please don't use external storage sites.
Instead, use the "+ Attach file" link in the bottom-left of your posting box, to attach the files to your post.
We also don't need a copy of your entire MQL5 directory.
Post only the relevant files.
According to your "20231230 - VPS.log" you have a large number of "Invalid request" errors.
CS 0 23:10:55.048 EA_IWBDT (EPH24,M1) 2023.12.08 05:06:45 @#@#@#* Stop To Scratch: true CS 2 23:10:55.048 Trades 2023.12.08 05:06:45 failed modify #17 buy 2 EPH24 sl: 4639.00, tp: 0.00 -> sl: 4640.00, tp: 0.00 [Invalid request] CS 0 23:10:55.048 EA_IWBDT (EPH24,M1) 2023.12.08 05:06:45 Alert: Modify position: Error 10013 - Invalid request CS 0 23:10:55.048 EA_IWBDT (EPH24,M1) 2023.12.08 05:06:45 MqlTradeRequest - action:6, comment:, deviation:0, expiration:1970.01.01 00:00:00, magic:0, order:0, position:0, position_by:0, price:0.0, ls:4640.0, stoplimit:0.0, symbol:EPH24, tp:0.0, type:0, type_filling:0, type_time:0, volume:0.0 CS 0 23:10:55.048 EA_IWBDT (EPH24,M1) 2023.12.08 05:06:45 MqlTradeResult - ask:0.0, bid:0.0, comment:Invalid request, deal:0, order:0, price:0.0, request_id:31, retcode:10013, retcode_external:0, volume:0.0 CS 0 23:10:55.048 EA_IWBDT (EPH24,M1) 2023.12.08 05:06:45 Modify position: 10013 - Invalid request, SL: 4640.0, TP: 0.0, Bid: 4640.75, Ask: 4641.0, Stop Level: 0
Did you not analyse your own log files and debug your code to resolve the issue?
Ty for the responses.
I will update with a zip of relevant files then. See attached.
I am aware, however if you look at the other log file, of the same day and time, just done on my actual PC there are none of those errors. This is the issue.
Then you need to debug the code while it runs in the VPS environment. Add the necessary "prints" to analyse the situation. We can't debug it for you.
Also your code has multiple dependencies and is difficult to analyse and narrow down possible issues at a quick glance.
Then you need to debug the code while it runs in the VPS environment. Add the necessary "prints" to analyse the situation. We can't debug it for you.
Also your code has multiple dependencies and is difficult to analyse and narrow down possible issues at a quick glance.
Hrmm, I cleaned up a ton of print statements. I am not sure what else to print out other than the price info, curr price, ret code (10013), mqlrequest/response, etc. I honestly am just at a loss. Do you have any recommendations as to what to print out? It is just so weird that it works on one and not the other.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have been working on an EA for some time now and suddenly the code just seems to not work on my VPS anymore but still works just fine on my home PC. The issue seems to be that the trades open just fine but then modifying the stoploss of an open trade throws errors. I have tried copying the code over to make sure there is no difference, I have tried compiling the EA on my home PC and moving the ex5 file over and running that, no difference. I even spun up a fresh VPS and got the same results. I am really at a loss now after over a day and a half of staring at this trying everything I can. Anyone have any thoughts/suggestions? Has anyone encountered this before?
Edit: I am not even sure what information to provide here since I cant narrow down the issue at all as it tests just fine, as I said, on one system but not the other. Manually confirming that the stop should be balanced as well yielded no result.