Questions from Beginners MQL5 MT5 MetaTrader 5 - page 489
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
.... Throw the required indicators on the chart and continue testing....
How do you do it? The answer is probably obvious, but it's not working for me.
In general, you need to visualize exactly those buffers that are calculated in the EA, because:
1. it's easier to debug them
2. the Expert Advisor, depending on its state (whether a deal is opened or not), calculates the indicator with different parameters, but in the same buffer. As a result, the values will be different from the same indicator just thrown on the chart.
How do you do it? The answer is probably obvious, but it's not working for me.
In general, you need to visualize exactly those buffers that are calculated in the EA, because:
1. it's easier to debug them
2. the Expert Advisor, depending on its state (whether a deal is opened or not), calculates the indicator with different parameters, but in the same buffer. As a result, the values will be different from the same indicator, just thrown on the chart.
Display the indicator lines on the chart by OBJ_TREND objects from the EA according to the data calculated in the EA for the last bar and the current bar.
Thank you. I've already thought of such a solution, but it has a disadvantage: the performance leaves a lot to be desired, especially since I have 3 built-in indicators. Maybe there are other ways?
Thank you. I have already thought about such a solution, but it has a disadvantage: performance leaves much to be desired, especially since I have 3 built-in indicators. Maybe there are other ways?
1. Put the required indicators with the appropriate parameters on the chart, save the template with the EA name or under the name "tester" and then when you start the EA in visualisation mode, all the required indicators will be visible on the chart.
2. The indicator values can be drawn in the Comment() but this slows down the testing as well as the chart objects.
I can't understand what the terminal log message means : 2015.12.28 18:30:39.718 '1656096': order #0 buy 0.00 at 0 was modified -> sl: 0 tp: 0
Hi.
There is a confusing situation with the deviation tolerance during testing.
1) I set deviation =10 points
2) Running
or
It doesn't matter if I put lastprice, or signal price, or just 0.
3) I do the test
а)
I get 20, which is more than 10
б)
request.deviation
LM 0 08:57:35.303 Фракталы - неск,ТС,% (Si Splice,M5) 2015.01.29 14:15:32 Отклонение от запрашиваемой цены: 1
I get the price from MqlTradeTransaction - after the signal (70865), ctrade buys for 70885.
в)
Print(mytrade.RequestDeviation());
= 10.
What could be the problem? Of course, we can watch the last trade or offer in the stack, but based on the first results in the real, it's all unreliable.
Or put a limit order price+10 and remove it after some time.