[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 397
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
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?