Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1215
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
Good afternoon everyone, can you please help me to solve this problem, the problem is in logic, I've broken my brain today and I've come to the point where I'm in a mess.
I have written an elementary code sample, there is a signal if candle's close is bigger than waggon, one order is opened.
The signal will stay and stay true for a long time. I am sure you know what I mean,
As a matter of fact, how should I make a signal to buy open one order and that's it, until the situation changes and the close price is lower than the Mask.
You have the wrong task, hence the lack of understanding of how to do it.
The task should look like this: on bar 1 there is a "buy signal", while bar 2 has no such signal - it means it is a buy signal
respectively there will be a prohibition on reopening and a prohibition to trade "in the middle of the signal".
the brackets can be removed, I wrote the condition for easy reading
Why do I get the handle first, and then copy the buffer? I do not understand why the function does not return the indicator value at once. Maybe, the data of other indicators doesn't fit in one variable, and they left it like that to avoid re-doing it for specific indicators. Perhaps, it makes no difference where to write the intermediate handle?
there is not much difference
And if a trawl is triggered ??? Then everything will start all over again !
Flags either control the number of order types or if there is a ticket control the closing time of the market order, if not equal to zero then the order has closed and the order opening flag is false.
Please advise. I have an EA that takes data (time) from an indicator and counts the difference in milliseconds between ticks.
I output it via Alert and get the following (see picture). As I see it, first I get the total number of milliseconds and then the difference in milliseconds between the last 4 ticks (between 1 and 2, 2 and 3, 3 and 4).
Why is it like this? I only need the values for the 4th tick.
Honestly, I don't understand what you need. Write in formulas how you understand what is output and what you need.