First you need to check the calculation order https://docs.mql4.com/ru/basis/operations/rules it looks like 1,2*z1 As for the previous question, it is easier to write an EA to be tested on a period of one day and which opens one order at a certain time. By changing stop and profit values we may look at the result. But considering that there is no data on ticks, the spread with the test will be in any case.
splxgf>>: для начала надо глянуть порядок вычислений https://docs.mql4.com/ru/basis/operations/rules похоже 1,2*z1 По предыдущему вопросу проще написать советник тестируемый на периоде в один день и который открывает один ордер в определенное время. Меняя стоп и профит смотреть на результат и вкуривать. Но учитывая что нет данных по тикам, то разброс с тестом будет в любом случае.
Apparently so! Even before I got the answer, I changed x1 from int to double and also got the desired 1.2 - but how long it took me to realise what was going on! It's like that joke: I guessed all the letters, but couldn't say the word :)
Решил изменить свой Советник таким образом, чтобы его можно было оптимизировать по ценам открытия.
С открытиями нет проблем, но что делать с фиксированными Stop Loss и Take Profit? Я не совсем понимаю как это работает в этом режиме.
Допустим Бар открылся выше [Stop Loss = 30 пипс] и закрылся ниже Stop Loss. Будет ли убыток = 30 пипс или он будет рассчитан по
цене открытия следующего Бара (если откроется ниже СЛ)?
Также, есть ли какие-нибудь советы, рекомендации по этой теме?
Спасибо!
the loss will be exactly 30 pips, but there is a more complicated question: if a new bar has caught both stoploss and takeprofit, what will the tester execute? Obviously, it should do what happened earlier, but how will it know about it if it works only with opening prices? That is why they say that this method of testing is very inaccurate, unless the EA opens and closes positions only at the moment when new bars are opened - and no stoplosses, sorry.
убыток будет ровно 30 пипс, но есть вопрос и посложнее: если новый бар зацепил и стоплосс и тейкпрофит, что будет исполнять тестер? Очевидно, должен то, что произошло раньше, но откуда он об этом узнает, если работает только по ценам открытия??? Вот по-этому и говорится, что данный метод тестирования очень неточный, если только в советнике как открытие, так и закрытие позиций не происходит только в моменты открытия новых баров - и никаких стоплоссов, уж извиняйте.
- This is fine (exactly 30 pips).
- If one bar overlaps both SL and TP - it seems in this case MT will choose the most pessimistic option and protect the trade
as unprofitable (better check again). Apparently this (in my specific case has not yet seen) a rare occurrence -
may be found when testing on all ticks (after optimizing on opening prices).
- If we close trades by bar closes - how can we calculate the number of lots to open a position?
Hi all, here is the comment displayed by the EA. Then you disconnect the EA from the chart, but the comment remains. I understand that we have to make the comment an object and then prescribe deleting this object in deinit. Theoretically it's clear, but in practice, not so much. Professionals, can you give me a code template on how to do this, please?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Another question, unrelated to the previous one:
- What should the expression [(x1+100) / 100] be equal to when calculating y1? (z1 is no longer 0)
Another question, unrelated to the previous one:
- What should the expression [(x1+100) / 100] be equal to when calculating y1? (z1 is no longer 0)
More correctly would be
для начала надо глянуть порядок вычислений https://docs.mql4.com/ru/basis/operations/rules похоже 1,2*z1 По предыдущему вопросу проще написать советник тестируемый на периоде в один день и который открывает один ордер в определенное время. Меняя стоп и профит смотреть на результат и вкуривать. Но учитывая что нет данных по тикам, то разброс с тестом будет в любом случае.
Good idea about the Councillor!
Более правильно было бы так
Apparently so! Even before I got the answer, I changed x1 from int to double and also got the desired 1.2 - but how long it took me to realise what was going on! It's like that joke: I guessed all the letters, but couldn't say the word :)
Решил изменить свой Советник таким образом, чтобы его можно было оптимизировать по ценам открытия.
С открытиями нет проблем, но что делать с фиксированными Stop Loss и Take Profit? Я не совсем понимаю как это работает в этом режиме.
Допустим Бар открылся выше [Stop Loss = 30 пипс] и закрылся ниже Stop Loss. Будет ли убыток = 30 пипс или он будет рассчитан по
цене открытия следующего Бара (если откроется ниже СЛ)?
Также, есть ли какие-нибудь советы, рекомендации по этой теме?
Спасибо!
the loss will be exactly 30 pips, but there is a more complicated question: if a new bar has caught both stoploss and takeprofit, what will the tester execute? Obviously, it should do what happened earlier, but how will it know about it if it works only with opening prices? That is why they say that this method of testing is very inaccurate, unless the EA opens and closes positions only at the moment when new bars are opened - and no stoplosses, sorry.
убыток будет ровно 30 пипс, но есть вопрос и посложнее: если новый бар зацепил и стоплосс и тейкпрофит, что будет исполнять тестер? Очевидно, должен то, что произошло раньше, но откуда он об этом узнает, если работает только по ценам открытия??? Вот по-этому и говорится, что данный метод тестирования очень неточный, если только в советнике как открытие, так и закрытие позиций не происходит только в моменты открытия новых баров - и никаких стоплоссов, уж извиняйте.
- This is fine (exactly 30 pips).
- If one bar overlaps both SL and TP - it seems in this case MT will choose the most pessimistic option and protect the trade
as unprofitable (better check again). Apparently this (in my specific case has not yet seen) a rare occurrence -
may be found when testing on all ticks (after optimizing on opening prices).
- If we close trades by bar closes - how can we calculate the number of lots to open a position?
Comment("Sample text" );
Hi all, here is the comment displayed by the EA. Then you disconnect the EA from the chart, but the comment remains. I understand that we have to make the comment an object and then prescribe deleting this object in deinit. Theoretically it's clear, but in practice, not so much. Professionals, can you give me a code template on how to do this, please?