Breaking through the morning flat - which pairs? - page 16

 
ikatsko писал(а) >>
I slightly re-did the linear regression indicator (by Dserg) in the following direction: I specify the time to find the Morningside flat (from 16:00, but not later than 23:00 to 7:00, but not earlier than 1:00). The indicator finds Nlin and minimum r0. And signals Up[i], Dn[i], Stop[i], Target[i] are not generated immediately after formation
Hello, could you please comment on the behaviour of the indicator.
I have not analyzed its work. I decided to test it and I saw some strange behaviour.
Indicator parameters are by default.
And if possible, please, tell me more about it: The indicator finds Nlin and minimum r0



 
Dserg писал(а) >>
Here's a little tip on the breakdown:


It looks great. But most importantly - the maximum series of losing trades is only 2 or 3. So it is possible to use martin to your liking.
Chop the dough, it is not a pity :-)


Thank you. The Expert Advisor is very interesting. But during the hit and run, I have detected incorrect determination of the next lot size (in the red frame)



The complete report and set-file is attached. Look at plz.
Maybe so conceived by the author? But it's not logical...

The problem seems to lie here

if (Hour()==h1 ) {
      if (Ns==1 && Nb==1 && n>0) {
         n--;
         Coeff /= Fact;
      }
         
      CloseBuyStopOrder();
      CloseSellStopOrder();
   }   
Files:
a2.zip  29 kb
 
renoshnik писал(а) >>
Can I join in the conversation?
I've posted here an EA for breakdown of session levels and decided to tune it to "nighttime flat" - it's a nice picture in the tester...

if more details here - http://voloshin-fxcci.blogspot.com/2010/03/blog-post_18.html
the Expert Advisor is here - https://www.mql5.com/ru/code/9465


What was the point of .... - to tune it to nighttime flat
If it's tied to sessions.
"..... Forgot a small comment to the picture - if you notice - there are teeth on the chart, it works this block program...."

Of course, this is not in the Expert Advisor :)


 
lasso >>:


Спасибо. Советник очень интересный. Но при разборе полетов, выявилось некорректное определение размера следующего лота (в красной рамочке)



Полностью отчет и set-файл во вложении. Посмотрите, плиз.
Может так задумано автором? Но как то не логично...

Проблема вроде кроется здесь


I've forgotten exactly what it was about, but the idea was as follows:
RiskCoeff balances the risk per trade depending on the size of the flat. Fact is in charge of the martin step. I.e. if we set Fact=1 all profitable trades must be equal. Unfortunately, I do not remember what this part of the code is responsible for.
 
Dserg писал(а) >>


I've forgotten exactly what it was about, but the idea was as follows:
RiskCoeff is in charge of the risk per trade depending on the size of the flat. Fact is responsible for step of martin. I.e. if we set Fact=1 all profitable trades should be equal. Unfortunately, I don't remember what this specific code section is responsible for.

There it turns out that if two stop orders are not triggered before the next "cycle" starts, they are removed and the step of the martin (n--) is reset to one (which makes sense), and this

Coeff /= Fact;

I do not know why. Well, never mind. Let's figure it out.
// ----
And I thought I was the only one so forgetful ......
Turns out it's not all bad for me. :-))))

 
Dserg писал(а) >>

I've forgotten exactly what it was about, but the idea was as follows:
RiskCoeff is in charge of leveling the risk per trade depending on the size of the flat. Fact is in charge of the martin step. I.e. if we set Fact=1 all profitable trades should be equal. Unfortunately, I do not remember what this code fragment is responsible for.

Ok.
Can you answer a simple question: in your opinion, the dynamics of increasing the lot size in the area highlighted in the red frame (there are six trades) is correct and logical?
In my opinion, in the first series (four losses and one gain) - everything is correct.
In the second series (three losses and a win after that at the minimum bet), I think not.
 
lasso >>:
Здравствуйте! Не могли бы Вы прокомментировать такое поведение индикатора.
Работу его не разбирал. Решил потестировать и увидел не понятное, на мой взгляд, поведение.
Параметры индикатора - по умолчанию.
И если можно, чуть поподробнее, об этом: Индикатор находит Nlin и минимальный r0



In the original Dserg-a indicator, the signals are generated immediately after a break in the channel. But the width of the channel had to be set manually. My suggestion is to set the expected time (range) for "catching" the morning flat. During this period of time, the indicator selects MINIMUM channel width going through various channel variants from StartTime to FinishTime and only at the finish (when there are no other variants) a channel with minimal width (r0) is drawn whose length is equal to the number of bars between Start and Finish (Nlin). And if by that moment the channel (obtained) has been broken, output signals are generated. I am now thinking about the criterion of channel length optimization. Maybe someone has an idea?

 
Dserg писал(а) >>


I've forgotten exactly what it was about, but the idea was as follows:
RiskCoeff is in charge of leveling the risk per trade depending on the size of the flat. Fact is in charge of the martin step. I.e. if we set Fact=1 all profitable trades should be equal. Unfortunately, I do not remember what this code fragment is responsible for.


The problem is that in a situation when two stop orders didn't trigger before next "cycle" (eg, before 2:00 am), they are removed and a step of a martin step (n--) is reset to one (which is logical), and Coeff /= Fact; returns to its initial value before that event, but variable lastB is not returned.

And
if instead of if (lastB-AccountBalance()>0.0) use I. Kim's function if (isLossLastPos("0", -1, nMagic)) everything is in its place.
In my case, the results did not improve much after the correction. But I do not know how it will affect the EA results at different settings.

If you don't mind, I can fix it and post it here.

 
lasso >>:


Проблема в том, что в ситуации когда два стоп-ордера не сработали до начала следующего "цикла"(напр., до 2:00 утра), они удаляются и шаг ступени мартина (n--) сбрасывается на единицу (что логично), и Coeff /= Fact; возвращается в исходное до этого события значение, а вот переменная lastB не возвращается.

А если вместо конструкции if (lastB-AccountBalance()>0.0) использовать ф-цию И. Кима if (isLossLastPos("0", -1, nMagic)) то все становится на свои места.
В моем случае результаты после исправления улучшились не на много. Но неизвестно как это повлияет на рез-ты советника при других настройках.

Если Вам в лом, могу поправить и выложить здесь.


That's great!

That's exactly the kind of feature I've been missing.

I'll know.

 
lasso >>:

Хорошо.
Вы можете ответить на простой вопрос: динамика наращивания размера лота на участке выделенном в красной рамке (там шесть сделок) на Ваш взгляд правильна и логична?
На мой вгляд в первой серии (четыре проигрыша и один выигрыш) - все правильно.
Во второй серии (три проигрыша и выигрыш после этого по минимальной ставке) - думаю нет.

The maximum number of losses is set in the Nmax variable. Make it larger, and the EA will increase the lot further. In general, if in this series Nmax=4, then the lot was calculated incorrectly.