Questions from Beginners MQL5 MT5 MetaTrader 5 - page 827
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
help tweak the indicator - can't get a handle on the last bar!
The indicator considers a series of continuous wins for binary options, taking into account that the bet will be made every 2 bars (ie, after one - win/loss, wait for the current bar), the external variable is a price analysis of the previous bar in an upward or downward price
I have a feeling it works, but online the last bar is not considered correctly, and as a consequence if I place the indicator on M1 the data from the history will be correct, but everything online is not calculated correctly, the code:
thanks in advance!
Hello! Please help me with the signals module to close positions. What am I doing wrong?
Your file is the SIGNAL module. In the Expert Advisor system, it is integrated in the same way as the USER indicator's SIGNALS module. In other words, the signals generated by your module have a WEIGHT, and it may happen that this weight is not enough to trigger the signal.
You need to think about the best way to do the closing in your case. Perhaps you should not do it in the signal module
Your file is the SIGNAL module. In the Expert Advisor system, it is integrated in the same way as the USER indicator's SIGNALS module. In other words, the signals generated by your module have a WEIGHT, and it may happen that this weight is not enough to trigger the signal.
You need to think about the best way to do the closing in your case. You may not want to do it in a signal module.
I would like it to be done as a signals module that could be collected by an Expert Advisor generator. At the moment when the module is to be triggered, LongCondition() and ShortCondition() in the second EA module return zero values - i.e. weight=0, I understand it correctly? Accordingly, the weight of this module must outweigh the signal, but it does not work. In CheckCloseLong() and CheckCloseShort(), I have inserted the Print("-------------"); and Print(time_GMT_DST()); which, during normal module operation, should make appropriate entries in the log upon receipt of each tick. The entries are not made; CheckCloseLong() and CheckCloseShort() are not called. What's the catch?
I'm clumsy, of course, but I'm just learning.I would like it to be in the form of a signals module, so that it would be possible to assemble through the EA generator. At the moment when the module is to be triggered, LongCondition() and ShortCondition() in the second module of the EA return zero values - i.e. weight=0, I understand it correctly? Accordingly, the weight of this module must outweigh the signal, but it does not work. In CheckCloseLong() and CheckCloseShort(), I have inserted the Print("-------------"); and Print(time_GMT_DST()); which, during normal module operation, should make appropriate entries in the log upon receipt of each tick. The entries are not made; CheckCloseLong() and CheckCloseShort() are not called. What's the catch?
I'm certainly a clumsy explanation, but I'm just learningUse methods
Instead of their CheckCloseLong and CheckCloseShort.
Thank you.
Hello, can you tell me how to make a counter for losing trades?
The Expert Advisor analyses the last trade on the history - if it is unprofitable, then it adds +1 to the variable, which will be the number of consecutive losing trades.
As soon as a profitable trade comes in - the variable needs to be reset to zero.
Hello, could you please advise how to make a counter for losing trades?
The Expert Advisor analyzes the last trade on the history - if it is losing, then it adds +1 to the variable, which will be the number of consecutive losing trades.
As soon as a profitable trade comes, the variable must be zeroed.
We can refuse from working with trading history and work only with OnTradeTransaction() - there we will catch a deal of type "OUT" - i.e. it will be the position closing. Once this trade is found - we determine whether it was profitable or unprofitable. Respectively, the counter"losses" should be reset or increased.
And the check in the trading history should be done in OnInit() - once at start of the Expert Advisor.Hi all,
Can you tell me how I can programmatically clear the EA log before displaying information in it :?
Only through Win API?
Thank you!
Hi all,
Could you tell me how to programmatically clear the EA log before displaying information in it :?
Only through Win API?
Thank you!