Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1821
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
You still don't get it, do you? I tried to explain why your condition is always true and the order closes.
Got it, got it, further reasoning was personal. It slipped out.
Got it, got it, the reasoning was personal. It's gone.
Calculate profit in pips (it's easy) and set x value in pips too. As a result, everything will be in pips. Set x less than the spread (for your example more). Then everything will work correctly.
You could do it that way, and you could do a virtual sl. But I haven't done that yet.
The main thing is to get a signal to close the order when it reaches -x
Порт-моне тв #:
a) code to create a button on the graph; this also includes the scoreboard as a background object;
b) code for entering values into this scoreboard (pips, seconds) special fields for this;
a1)
а2)
б)
hello
found a function that keeps track of the current price value
question:
how to specify the current symbol ?
it is not clear what isMqlTick&?
The handbook states that it is a structure for storing the latest prices for a symbol. It is intended to quickly obtain the most requested information on current prices.
But in the usage example it is stated:
That is, the function that refers to the MqlTick structure is itself inside the structure.
How can this be?
But in the usage example it states:
That is, the function that refers to the MqlTick structure is itself inside the structure.
How can this be?
It is a structure
MqlTick last_tick;
and this is a reference to it by a certain symbol
It is a structure
and this is a reference to it by a specific symbol
... and then there is no example of reading the structure. Judging from the first question, the person will not understand it either.
Post the closing function and what "-x" is
There is nothing else. And x is a negative profit value on an open order.
Post the closing function and what "-x" is
The close function is at which condition should an order be closed?
Is x a condition?
Then what did I show?
Or if you don't mind, write in more detail what is needed.
In any case, thank you!
But in the usage example it is stated:
That is, the function that refers to the MqlTick structure is itself inside the structure.
How can it be?
The SymbolInfoTick function writes tick data into a specialMqlTick structure, from the fields of which they can be obtained.