Scripts not working after build 625 - page 2

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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
Thank you, pro!
Unfortunately, still not working!
What is the StopLevel of your account ??
Why don't you check reason if OrderSend fails ?
GetLastError() .....????
what error do you get ?
When I launch a script (`Modify_BUY-SL-TP.mq4`, for example), it opens a normal window where i`m introducing my dates, press ' ok ' button, the window closes as usual and then nothing happenes what should hapen: to change my SL or TP of current orders. I waited 5 minutes even without anything happening. But, when I want to open it again or start another script, I see the window that asked if I want to close my first script or not. Now, regardless of the option chosen, the platform is freezing for a few seconds (10-15).
I hope that my explanations are consistent.
What is the StopLevel of your account ??
Why don't you check reason if OrderSend fails ?
GetLastError() .....????
- Stop level is 5 pips. When entering data incorrectly the script warns me ' SL (or TP) is to close to market or on wrong side '.
- I checked in the ' Journal ', if that's asking me. I see ``10: 53: 56.982 Script Modify_SELL-SL-TP EURUSD M5 loaded successfully`` when I open the script and, then, after entering my data and press ' ok ', i have this ``10: 54: 09.867 Script Modify_SELL-SL-TP EURUSD M5: removed``.
first: you using
bool result;
supposed to be
int result;
second: why did you declared it if you dont intended to use it ? use it as DevRies suggested
first: you using
supposed to be
second: you why did you declared it if you dont intended to use it ? use it as DevRies suggested
I`m sorry qjol, but, because i have not programming skills, i dont understand what you`re trying to say.
Thanks anyway.
Identifiers - MQL4 Documentation
I`m sorry qjol, but, because i have not programming skills, i dont understand what you`re trying to say.
Thanks anyway.
When you are writing your code, you can click on any of the standard functions and press F1, this will open the help window and give you some details of the function.
What you should note is that OrderSend returns an integer and that integer will be the ticket number if successful and -1 if it fails.
But, you are not assigning that value to an integer variable, you are passing it to a boolean.
Now, you have to know that a boolean can only have one of two values, false or true. As outputs, false=0 and true=1
This means that
can never be true, because result is a boolean variable and the only possible integers are 0 or 1
When you are writing your code, you can click on any of the standard functions and press F1, this will open the help window and give you some details of the function.
What you should note is that OrderSend returns an integer and that integer will be the ticket number if successful and -1 if it fails.
But, you are not assigning that value to an integer variable, you are passing it to a boolean.
Now, you have to know that a boolean can only have one of two values, false or true. As outputs, false=0 and true=1
This means that
can never be true, because result is a boolean variable and the only possible integers are 0 or 1
Thank you for your kindness, GumRai. But, i still dont understand what should i do with this informations. The scripts are not working after build 625 and i`m still not working. Thanks again!
Just took a few minutes to check one of the scripts you are talking about. It is working just fine! It works as is, but still should be changed as was advised above, namely it should not be bool result, but int result.
Are you aware that in a new version of MT4 all experts,indicators, and scripts should be inside proper folders inside MQL4 folder? Maybe that is a problem. I heard about similar confusions others had. So check that. Other than that there is nothing to advise you since the script IS working!
I made some changes and here it is, place it in the right folder, it works.
I made the changes and, though, nothing has changed. Even with the above scripts, nor with 15 other scripts. The problem seems to be somewhere else.
Thanks again, pro!