[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 571
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
Greetings.
I would like to ask about the visibility areas in MQL4. Here's a piece of code:
I wonder why all of a sudden the compiler swears "variable already defined" when rec declaring a variable in another scope. I don't believe him, of course, but he doesn't care much about this fact.
Well, actually, I understand there shouldn't be such a thing since there are different scopes and so on. This is a clever trick or my hands are very crooked? I'd really want a variable to die with a sense of accomplishment when leaving the scope it was defined in. How do I even up my hands?
And where did you find "another scope"? In a new line?
All within the same function. So unambiguously - hands ... :)
How do you level your arms? With a hundred...Hello.
I am writing an EA in mql4. At a certain moment, it draws a standard Fibonacci channel with 4 levels and a horizontal line which intersects the Fibonacci channel with all its levels.
I've been reading Yandex, tutorials and google for 5 hours. Please, help me to find crossing of horizontal line with one of Fibonacci levels of the channel. I know 3 coordinates of channel construction, I know levels (0.15, -0.15), I know price of horizontal line. Please advise how to find coordinates and assign them to variables of two arbitrary points lying on one of the lines-levels of the channel.
How about the straight line equation to help you?
x1, y1 - coordinates of the first point; x2, y2 - coordinates of the second point; x - value for which to calculate y.Help me to set a take profit
The problem is this: let's say I buy 0.01 lot in EUR/USD at 1.31000 (deposit in EUR).
I have to set Take Profit to a value when the profit will be 1 euro. How do I calculate it?
I cannot do it, because sometimes 1 point movement adds 1 euro or 2 euro.
You are in luck. If you have a profit, you should close it when the terminal calculates 2 cents per point. If you have a loss, you should close it at 1 cent per pip.
I'm not so lucky: only 1 cent a point and not a cent more.
You are in luck. If a position is in profit, you should close it when the terminal calculates 2 cents per point. And when in a loss, you close it at 1 cent a pip.
I'm not so lucky: only 1 cent a pip and not a cent more.
I'm tempted to ask a question of my own as well
In the picture the top line is quite different from the second, which should not be
Attached is a script (so as not to bother)
Saw it on a website somewhere, but can't find it.
What is the difference between a stop order and a limit order?
Saw it on a website somewhere, but can't find it.
What is the difference between a stop order and a limit order?
https://book.mql4.com/ru/appendix/limits
https://book.mql4.com/ru/appendix/limits
Will you be opening positions from the market?
+ possibility of selecting a market order or buy or sell so?