A flat indicator. - page 7

 
Ibragim Dzhanaev:

Solved the problem of how to explain the trend\flat to the robot. Subject closed.

Mediator :=))



Without MM. Without optimization. Tested the system.


If I open a signal, do not forget to subscribe ;)


The intermediary does not solve the problem, it only postpones it for a small lag period, which the intermediary provides.

 

As an example of solving the problem - reddish entry into a flat, blue entry into the trend... Yes, there are some small deficiencies, but the indicator has not yet taught to adjust to the search for a flat level, but it's a matter of technology and development... But if you look, you already know that 70% of customers do not need to hurry so we wait where to enter and when to enter... simply and easily without averaging.

 

In order to show something, you must first define exactly what the terms are. What is a flat? A trend?

First of all, let us at least define the criteria of a flat, and consider that we need to make an Expert Advisor, which would make profit in this flat by opening deals inside the flat or so called flat channel.

So, the signs of a flat and its possible characteristics are as follows:

1. the price movement for a certain number of bars is in the price corridor for a certain number of points, the price must cross the upper and lower limit a certain number of times. The borders of the channel do not have to be on the maximum or minimum values of the candlesticks. The distance between the extrema during this period should not exceed a certain number of percent of the channel, for example 150%.

2) Considering that the flat strategy implies opening on the rebound, let us allow some slope of the channel, for example upwards. Then we will not earn much on down trades and will earn much on up trades. That works for us too.

3. A flat channel may widen, change its slope, shift or end.

4. The flat may be short, for example 10 bars, and may be long, for example 100 bars or 1000.

5. I suggest you fill in and discuss it.

Some items of course may be argued, but adhere to the principle of the original strategy Let me remind you: the basic rule - to open on rebound from the channel boundary in order to make a profit. Suppose not on every deal, but on series of at least 5 deals.

In fact, when we single out a flat, then everything else will be a trend. On some days or even weeks, there will be no trends at all. We will only see flat segments with different characteristics.

Therefore, trends will most often appear for a short period of time during news releases, which is predictable in more than 80% of cases.

 
Evgeniy Gutorov:

As an example of solving the problem - reddish entry into a flat, blue entry into a trend... Yes, there are small errors, but the indicator has not yet taught me to adjust to the search for the level of a flat... but it's a matter of technology and skills... So if you look, you already know that 70% of not need to hurry so we wait where to enter and when to enter... simple and easy, without averaging.

I found a better way than direct averaging - I am testing it now. You don't need an indicator there, the algorithm itself is an indicator.

There are lots, but of course they won't appear in reality. The exodus from the algorithm itself and the absence of the indicator leads to the fact that transitions from flat to trend and vice versa are detected as if in advance. It happens because it does not matter which way the price will go. There are pending orders for all variants. I am not very good at formulating it but I hope it is clear.

https://www.mql5.com/ru/forum/228264/page2

Нужно ли на рынке прогнозирование с вероятностью более 50% ??
Нужно ли на рынке прогнозирование с вероятностью более 50% ??
  • 2018.02.23
  • www.mql5.com
Во многих темах можно встретить утверждение, что для работы на рынке вероятность правильного прогнозирования должна быть, ну обязательно, больше 0...
 
Dmitiry Ananiev:

In order to show something, you must first define exactly what the terms are. What is a flat? A trend?

First, let's at least define the criteria of a flat, and consider that we need to make an EA, which would make profit in this flat by opening deals inside the flat or so called flat channel.

So, the signs of a flat and its possible characteristics are as follows:

1. the price movement for a certain number of bars is in the price corridor for a certain number of points, the price must cross the upper and lower limit a certain number of times. The borders of the channel do not have to be on the maximum or minimum values of the candlesticks. The distance between the extrema during this period should not exceed a certain number of percent of the channel, for example 150%.

2) Considering that the flat strategy implies opening on the rebound, let us allow some slope of the channel, for example upwards. Then we will not earn much on down trades and will earn much on up trades. That works for us too.

3. A flat channel may widen, change its slope, shift or end.

4. The flat may be short, for example 10 bars, and may be long, for example 100 bars or 1000.

5. I suggest you complete the description and discuss it.

Some items of course may be argued, but adhere to the principle of the original strategy Let me remind you: the basic rule - to open on rebound from the channel boundary in order to make a profit. Suppose not on every deal, but on series of at least 5 deals.

In fact, when we single out a flat, then everything else will be a trend. On some days or even weeks, there will be no trends at all. We will only see flat segments with different characteristics.

Respectively trends will appear more often at news releases that is predictable in more than 80% of cases.

What is a trend?

When the wavebars do not overlap.

What is a flat?

It is when they cross.

A flat may be short, 10 bars for example.

It is most likely a consolidation in an ongoing trend.


Post above, it's truer, quicker and easier. But I'm not going to describe it all - you have to do it yourself.

 
The most important thing no one has described is the chatter, where there is a constant shift from trend to flat and vice versa. This is accounted for. Without an indicator it is instantly detectable.
 
Ibragim Dzhanaev:
What is the best flat indicator in your opinion? If you're not sorry, you can send it here or in person.
There is an indicator that works, and accurately shows the flat. I would like to barter need a reversal indicator from sell to buy
 

I wrote one of these for myself a long time ago and screw it onto all my turkeys. It's quite useful in my opinion.


double De      = 10.0; 
int    period1 = 4; 
int    period2 = 7; 
int    period3 = 10; 

.....................................
   Ma1[i]  = iMA(NULL,0,period1,0,MODE_EMA,PRICE_CLOSE,i+1);
   Ma2[i]  = iMA(NULL,0,period2,0,MODE_EMA,PRICE_CLOSE,i+1);
   Ma3[i]  = iMA(NULL,0,period3,0,MODE_EMA,PRICE_CLOSE,i+1);
   Ma4[i]  = iMA(NULL,0,period3,0,MODE_EMA,PRICE_CLOSE,i+2);

  CCI30[i]  = iCCI(NULL,0,26,PRICE_TYPICAL,i+1);

  STHm[i]  = iCustom(NULL,0,"ZeroLag_Stochs_true",12,3,3,0,i+1);

  spread = (int)MarketInfo(NULL,MODE_SPREAD);

...............................
...............................
//Comment----------------------------------
       if(CCI30[0] < 124.00 && CCI30[0] > -124.00)
          {
       if(Ma3[0] - Ma4[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n BUY","\n SPREAD=",spread);
       if(Ma4[0] - Ma3[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n SELL","\n SPREAD=",spread); 
       if(MathAbs(Ma4[0] - Ma3[0]) <=De*Point) 
         Comment (" NAME( " + Periods + " )","\n NULL","\n SPREAD=",spread);
          }
       if(CCI30[0] > 124.00)
          {
        if(Ma3[0] - Ma4[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n BUY","\n CLOSE BUY","\n SPREAD=",spread);
       if(Ma4[0] - Ma3[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n SELL","\n CLOSE BUY","\n SPREAD=",spread); 
       if(STHm[i] > 70) 
         Comment (" NAME( " + Periods + " )","\n CLOSE BUY","\n SPREAD=",spread);
          }
       if(CCI30[0] < -124.00)
          {
        if(Ma3[0] - Ma4[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n BUY","\n CLOSE SELL","\n SPREAD=",spread);
       if(Ma4[0] - Ma3[0]>=De*Point) 
         Comment (" NAME( " + Periods + " )","\n SELL","\n CLOSE SELL","\n SPREAD=",spread); 
       if(STHm[0] < 20) 
         Comment (" NAME( " + Periods + " )","\n CLOSE SELL","\n SPREAD=",spread);
          }
//Comment==================================
 

Here's an idea. It's fresh, so it's raw. Don't mind me, let's think about it together.

We take another closed candle, memorise its high/low. And compare it to the mask. If it doesn't go beyond the candle, it's flat.

Or high/lowest for I don't know what period.
 
Artemij:

Here's an idea. It's fresh, so it's raw. Don't mind me, let's think about it together.

We take another closed candle, memorise its high/low. And compare it to the mask. If it doesn't go beyond the candle, it's flat.

Or for I don't know what period.

If the next candle does not go beyond the high and low, it's also flat.

If you want to make a condition - which candle (preferably a composite of two, from one high, from another low) to take as a basis, the spread, maybe you will get something useful on the topic

Reason: