Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 950
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
This function writes a number on each order, or rather lot*100.
Now we need an inverse function which shows what was the last number
Try it:
If the object contains text (not numeric), you need to add StringSubstr():
begin_index - index of the character in the string, starting from zero, length - length of the numeric value (how many characters the number occupies)... I think so
Try this:
If the object has text (not numeric), add StringSubstr():
begin_index - index of the character in the string , starting from zero, length - length of the numeric value (how many characters the number occupies)... I think so
Well initially you would have to look for these all numbers on the graph. It just won't work that way. That's the problem. Already checked.
Try this:
If object has text (not numeric), add StringSubstr():
begin_index - index of the character in the string, starting from zero, length - length of the numeric value (how many characters the number occupies)... I think so
Similar to this one, but it doesn't work. It shows zero.
Like this one, but it doesn't work. It shows zero.
Do you want to set a value or take a value? The ObjectSetString() function sets a text value and returns a bool value. This is not it. And in the loop head I think it's not the right one... Where ObjectsTotal()... I am guided by mt4 reference. Or is it mt5 code?
Do you need to set a value or take a value? The ObjectSetString() function sets a text value and returns a bool value. This is not it. And in the head of the loop I think it's not the right one... Where ObjectsTotal()... I am guided by mt4 reference. Or is it mt5 code?
This is MT4.
Once again, good day everyone!
I am not getting a response to my question posed earlier, but I am asking for help with the code anyway.
This is the forum for trading, automated trading systems and strategy testing.
Any newbie questions on MQL4 and MQL5, help and discussion on algorithms and codes
MrBrooklin, 2019.08.30 14:15
Good day everyone!!!
Here is part of the script code for Metatrader5:
The script should place either pending limit orders at a certain distance from ask and bid, or stop ones. The limit pending orders are set without any problems but the stop ones are not. Please help me to understand why pending Buy Stop and Sell Stop orders are not set.
Yours sincerely, Vladimir.
Just to follow up with another question: is there any way to test the script when the market is closed (e.g. at the weekend)?
Sincerely, Vladimir.
From which list?
And please use the styler in the editor (Ctrl+<):
What should be taken from where?
Can you give me a hint?
Once again, good day everyone!
No one has responded to the question I posed earlier, but I'm still asking for help with the code.
One more question: is there any way to test the script when the market is closed (e.g. on weekends)?
Sincerely, Vladimir.
No, the script will not work in a closed market - it will not place orders.
To understand the errors, try printing into the log the value of the price relative to which you are calculating the setting levels and the values of all price levels you are sending to the trade order.
Can you give me a hint?
You need to find the last order that was opened. Find its ticket. Then use the list of object names to find the occurrence of a substring with the found ticket of the last order in the object name line. As soon as the ticket of the last order is found in the object name, this is the necessary graphical object. All that remains is to extract what you need from this graphical object.