![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
What about the details? The phrase "not for the duration of the condition" is unclear.
For example, when finding a certain bar. This bar in the array is say the third. As long as this bar is the third in the variable truth. It is the third according to the timeframe. We will need to make an entry in the log. With every tick the number of records will increase until it becomes the fourth bar. So here is the question, how to perform simultaneous assignment of variable truth and simultaneous fulfillment of further conditions, and not with each tick until the variable has truth.
Alternatively, enter another variable to which you will assign the value true if the first variable is sent to print.
Hello, dear users and administration, could you please help me with the following problem. I decided to test free trading signals service https://www.mql5.com/ru/signals/mt4 I set the parameters as in the instructions, but nothing happens. I have entered the log with the following errors:
2012.11.16 11:04:14 '340421': Signal - synchronization failed, processing of trade actions disabled
2012.11.16 11:04:14 '340421': Signal - synchronization terminated, cannot copy position [#37469421 buy 10.00 USDCHF at 0.9411 sl: 0.9231 tp: 0.0000]
2012.11.16 11:04:14 Symbol: no prices for symbol U‰`¤"B<u}{њWr1zzfußtљUYShchµtuNЏEDT`P}sh197XT¬n "zlss®VYЏ--¶¶ԛl
KЂSh 9ґnhuP©h_Yu6nzj-KSQr-ÏŽS<"MSHr©±ЇР'Ì$eљ*t6&SО
.y*'HushR"±,emkЊG€a!ÇV®jtvЉGLYkҐj>5ґ DP@mii!)'HDњE "јў®ћLF‡...¦aў;srI
what's the problem with customisation? My broker is FBS
Alternatively, enter another variable to which you will assign the value true if the first variable is sent to print.
In the case you suggest, the variable is false with every tick and becomes true after printing to the log. Then there is a new tick and the onTick() operator executes its program from top to bottom. And there the variable is again false, and in the condition if the variable is false then print. And hence the log is full of entries with every tick. Checked!!!
I usedTimeCurrent() function in trying to logically understand the execution of the program in the statement, here is the code:
As a consequence, only those entries are logged where the tick has a time of 0 by the minute and 0 by the second. It's more complicated with the clock. The only thing that changes is the hour signal. Putting 0 will serve as a filter and produce an entry if the "Hammer" is at 00 o'clock, which is rare. At the same time the number of recordings has decreased, but still wants better.
This is a quick attempt to depict and find the "Hammer" candlestick pattern on the chart. By the way the example with the variable which is false is commented out here as well.
A hammer pattern is: the lower shadow is at least 2 and at most 3 times the body. The upper shadow is absent or very short (not more than 10% of the candle's range). The colour of the body is irrelevant in long term play; in short term play, the white Hammer is much stronger than the black one.
I would also like to clarify how to prohibit a variable from moving behind a price.
Example: A simple stop trawl. We tell the variable to follow the price at a distance of 20 pips (for example). In other words, variable = bid price - 20 pips (assuming we have bought). The price goes up and we successfully follow it. Then the price goes down and we need the variable to remain in its value at the same level.
So my question is, how do we prevent the variable from taking a value at a certain point?
Maybe you mean to determine the number of the bar you need, not on every tick, but only when a new bar appears? Look here or search the forum for the word combination IsNewBar.
Thank you!!! Useful reference!!! Will come in handy in the future.
But a bit off, though.... You can think of a way to get around that as well.
In the case you suggest, the variable with each tick is false and becomes true after a log print is executed. Then a new tick and onTick() operator executes its program from top to bottom. And there the variable is again false, and in the condition if the variable is false then print. And hence the log is full of entries with every tick. Checked!!!
I usedTimeCurrent() function in trying to logically understand the execution of the program in the statement, here is the code:
As a consequence, only those entries are logged where the tick has a time of 0 by the minute and 0 by the second. It's more complicated with the clock. The only thing that changes is the hour signal. Putting 0 will serve as a filter and produce an entry if the "Hammer" is at 00 o'clock, which is rare. That said, the number of recordings has decreased, but still wants better.
This is a quick attempt to depict and find the "Hammer" candlestick pattern on the chart. By the way the example with the variable which is false is commented out here as well.
A hammer pattern is: the lower shadow is at least 2 and at most 3 times the body. The upper shadow is absent or very short (not more than 10% of the candle's range). The colour of the body does not matter in the long term game; in the short term, the white Hammer is much stronger than the black one.