Questions from Beginners MQL5 MT5 MetaTrader 5 - page 336
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
Please. The screenshot contains the log as well as the settings.
And in the tester's log in visualization mode, what does it say?
Nothing new is being written... The chart is scrolling, no trades are being made. The log is silent.
As if there is no signal to trade, however, I put Alert() in the code after this section:
CTrade trade;
trade.SetExpertMagicNumber(MAGICMA);
trade.PositionOpen(_Symbol,signal,TradeSizeOptimized(), SymbolInfoDouble(_Symbol,signal==ORDER_TYPE_SELL ? SYMBOL_BID:SYMBOL_ASK), 0,0);
and Alert() shows a message, consequently, the moment, according to the logic, after which a deal should be executed, has passed.
Nothing new is being written... The chart is scrolling, no trades are being made. The log is silent.
As if there is no signal to trade, however, I put Alert() in the code after this section:
CTrade trade;
trade.SetExpertMagicNumber(MAGICMA);
trade.PositionOpen(_Symbol,signal,TradeSizeOptimized(), SymbolInfoDouble(_Symbol,signal==ORDER_TYPE_SELL ? SYMBOL_BID:SYMBOL_ASK), 0,0);
and Alert() shows a message, consequently, the moment, after which a trade would be executed, logically passed.
Interesting... I can suggest you try to open a demo account on MetaQuotes-Demo server and try running the test again. Or write to Service Desk.
I have a Demo account with BCS... And the service desk to whom?
There is, however, another possibility - I installed MT on my home laptop, and here (where I'm testing, at work) I just have the folder copied.
Maybe that's the reason... Something is not working properly. I'll have to try again at home, just to be sure.
I have a Demo account with BCS... And the service desk to whom?
There is, however, another possibility - I installed MT on my home laptop, and here (where I'm testing, at work) I just have the folder copied.
Maybe that's the reason... Something is not working properly. I'll have to try again at home, just to be sure.
Could well be...
Look for Service Desk in your profile, make a request there. But first of all try to run it from home.
Have a look here too. Good luck!
P.s. Please write out when it works in what was the reason. Can help others.
Good day, advise how to make that lines would be shown on all charts pair, when you open a new chart were immediately visible....podkat in the properties of which operator or function?
Draw a line once and save the template. On a new chart, simply apply the saved template. Or save the template as default.tpl and this default template will be applied to all newly opened charts.
Working with charts: Templates and profiles - Client terminal
Good day to all.
Please advise on testing EAs.
I am just beginning to learn how to write EAs.
I downloaded this EA: https://www.mql5.com/ru/code/1812, opened it in the editor, ran it for debugging, started testing and nothing happens. No trades open and therefore no results.
I have also tried other EAs, including the easiest one taken from here, which should just open and close trades. Same thing - nothing happens.
I have tried putting a breakpoint. It works only in OnInit. The rest of the code does not work, which is very strange.
I have understood that OnTick works by adding an Alert. However, no trades are opened and they are not opened even if the required conditions are met.
I have added an Alert(GetLastError(). The error 4753 is displayed.
The question is if I am doing something wrong. Are any of the conditions required for testing not satisfied?
Thank you in advance for your reply.
Also add after trying to open a position:
Where result - data of trade request result structure. What code is returned?
Еще добавьте после попытки открыть позицию:
где result - данные структуры результатов торгового запроса. Какой возвращается код?
Can you please elaborate on how to create this structure? After all, it has to be created and filled in before it can be accessed, as I understand it.
I'm not very familiar with it yet - I'm just getting to grips with it.
Regarding my research:
Already tried everything I could. I also ran a normally installed terminal. Result is the same.
Maybe I should try it on some 100% working, simple robot, with known parameters of all variables?
Then I can be sure that the EA will not run as it should and I will raise the case in the service desk.
Please advise me on some mega simple Expert Advisor, download it yourself and tell me with what parameters and with what pair it should be run?
Then we can check the results.