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
Hello! The two minus numbers q and w are compared incorrectly, when they are equal, the if operator thinks one is greater than the other.What is the error? When q = -0.0002 and w is also -0.0002, res12=false, why?
because it is a double and they are not exactly equal.
FIGURE : compare normalized values
Hello! The two minus numbers q and w are compared incorrectly, when they are equal, the if operator thinks one is greater than the other.What is the error? When q = -0.0002 and w is also -0.0002, res12=false, why?
Compare their difference to zero, this is more correct and works for numbers of any type.
People, here's a question -
There is a horizontal line, a day long.
It has a text label, a label object.
How can I make this text label always be in the middle of the line (in the middle of the day), at any zoom of the chart?
People, here's a question -
There is a horizontal line, a day long.
It has a text label, a label object.
How can I make this text label always be in the middle of the line (in the middle of the day), at any zoom of the chart?
Change the X coordinate of the marker, i.e. calculate it as the middle of the line
Well, that's understandable, but how do I do it?
I had a second option - with marker tied to the beginning of the day, using a text variable to insert spaces before the value of the marker, depending on the zoom of the chart.
In essence, I want the label to be on the left at close zoom, and at zoom out the label should be moved to the middle. Since the zoom levels in mt4 are standard, then for each zoom level it is not so difficult to find the right number of spaces. But here is a question - does mql4 have such a function that would determine the current chart zoom level?
Then everything will be simple, something like this: "if chartzoom = 50% then spacesnumber = 10", etc.
Where spacesnumber is string variable that defines number of spaces before label text, like __________1.23456 - there are 10 spaces with _ sign.
Well, that's understandable, but how do I do it?
I had a second option - with marker tied to the beginning of the day, using a text variable to insert spaces in front of the marker value, depending on the chart zoom.
In essence, I want the label to be on the left side at close zoom, and at zoom out the label should be moved to the middle. Since the zoom levels in mt4 are standard, then for each zoom level it is not so difficult to find the right number of spaces. But here is a question - does mql4 have such a function that would determine the current chart zoom level?
Then everything will be simple, something like this: "if chartzoom = 50% then spacesnumber = 10", etc.
Where spacesnumber is string variable that defines number of spaces before label text, like __________1.23456 - there are 10 spaces with _ sign.
Hi all! Need help again. Can't figure out what the error is. Trawl again. Trawl by MA. I need to trawl several orders. There may be loops. As long as there is one open order, everything is working perfectly. As soon as one more order is open, bacchanalia begins - constant modification (with one and the same parameter) of the first order (error 1 is not shown). In this case the second order is modified as it should be - when appropriate conditions are met (the first order, when conditions change, changes its parameters and continues constant modification with new ones). I cannot find the reason. Who would be able to give me a hint?
Hi all! Need help again. Can't figure out what the error is. Trawl again. Trawl by MA. I need to trawl several orders. There may be loops. As long as there is one open order, everything is working perfectly. As soon as one more order is open, bacchanalia begins - constant modification (with one and the same parameter) of the first order (error 1 is not shown). In this case the second order is modified as it should be - when appropriate conditions are met (the first order, when conditions change, changes its parameters and continues constant modification with new ones). I cannot find the reason. Who can help me?
1. The cycle should be reversed.
2. What's the break for?
1. The cycle must be reversed.
2. what is break for?
Hello.
1 - "The loop must be inverse" - do you mean for(i = k; i > 0; i--)?
2. "What's the break for?" - To exit. Generally, in the beginning, after selecting the order type and if it is against the trend break. Then we select the order type again and if it is trending, we modify it.
This variant of breaking helped me before. When you suggested a solution to trawl by MA. If, for example, on a buy trade, the stop was above the MA, I got error 1 until the MA was above the stop, after which the error disappeared. When I introduced the condition that if the stop is above the MA, then break, everything went back to normal.
Hello.
1 - "The loop must be reversed" - do you mean for(i = k; i > 0; i--)?
2. "What's the break for?" - To exit. Generally, in the beginning, after selecting the order type and if it is against the trend break. Then we select the order type again and if it is trending, we modify it.
This variant of breaking helped me before. When you suggested a solution to trawl by MA. If, for example, on a buy trade, the stop was above the MA, I got error 1 until the MA was above the stop, after which the error disappeared. When I set the condition that if the stop is above the MA, all has normalized.