expert based on Elliott Wave Theory - page 12

 
Yurixx:
Integer:
Yurixx:


Imagine a simple TS based on a normalized oscillator. At the highs we sell, and at the lows we buy. Thus, it is enough to identify the extremum at the right time to trade successfully. Simple, isn't it? And definitely enough. Can you do it quickly (not very quickly)? Or at least just do it ?


Can and very and fast.


Great ! Then throw in an RSI(14,Close) indicator on EURUSD, M1 and solve the problem of identifying without lagging RSI extremums.

The amplitude of RSI change between adjacent extremes should be at least 25.


Formulate the problem accurately and completely. If it is theoretically solvable, it is practically solvable too. Once the problem is formulated correctly, they can all be solved (and you can do it yourself). In this problem, the criterion of identifying an extremum is rolling back a value by 25 units, i.e. identification by such a criterion without a lag cannot be solved theoretically. If you define criterion - more than 25 on the left and more than 5 but less than 10 on the right - lag will be less but false signals will be more.

 
//+------------------------------------------------------------------+
//|                                                     toYurixx.mq4 |
//|                                                                * |
//|                                                                * |
//+------------------------------------------------------------------+
#property copyright "*"
#property link      "*"
 
#property indicator_separate_window
#property indicator_maximum 100
#property indicator_minimum 0
#property indicator_buffers 3
#property indicator_color1 Yellow
#property indicator_color2 DeepSkyBlue
#property indicator_color3 Red
//---- input parameters
extern int       RightMore=5;
extern int       RightLess=10;
extern int       LeftMore=25;
 
 
//---- buffers
double rsi[];
double u[];
double l[];
 
 
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,rsi);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,159);
   SetIndexBuffer(1,u);
   SetIndexEmptyValue(1,0.0);
   SetIndexStyle(2,DRAW_ARROW);
   SetIndexArrow(2,159);
   SetIndexBuffer(2,l);
   SetIndexEmptyValue(2,0.0);
 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    limit=Bars-IndicatorCounted();
      for(int i=0;i<limit;i++){
         rsi[i]=iRSI(NULL,0,14,0,i);
      }
      ArrayInitialize(u,EMPTY_VALUE);
      ArrayInitialize(l,EMPTY_VALUE);      
      for(i=Bars-1;i>=0;i--){
         double max=rsi[i];
         int maxb;
         for(int j=i;j<Bars;j++){
               if(rsi[j]>max){
                  max=rsi[j];
                  maxb=j;
               }
               if(max-rsi[i]>RightLess){
                  break;//не состоялся
               }
               if(max-rsi[j]>LeftMore){
                     if(max-rsi[i]>RightMore){//нашли
                        u[maxb]=rsi[maxb];
                     }
                  break;
               }
         }
         
         max=rsi[i];
         for(j=i;j<Bars;j++){
               if(rsi[j]<max){
                  max=rsi[j];
                  maxb=j;
               }
               if(rsi[i]-max>RightLess){
                  break;//не состоялся
               }
               if(rsi[j]-max>LeftMore){
                     if(rsi[i]-max>RightMore){//нашли
                        l[maxb]=rsi[maxb];
                     }
                  break;
               }
         }         
         
      }
      
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
 

Total 23.06.2007 01:45 - 23.06.2007 01:08 = 37 minutes it took me to solve the problem, but I also had coffee for this time. I should also introduce the criterion of the number of bars to the left of the extremum and to the right.

 
Integer:
Yurixx:


Great ! Then let's throw the RSI(14,Close) indicator on EURUSD, M1 and solve the problem of identification without a lag of RSI extrema.

The amplitude of the RSI change between adjacent extrema must be at least 25.


Formulate the problem accurately and completely. If it is theoretically solvable, it is practically solvable too. Once the problem is formulated correctly, they can all be solved (and you can do it yourself). In this problem, the criterion of identifying an extremum is rollback of 25 units, i.e. identification by such a criterion without a lag cannot be solved theoretically. If you define criterion - more than 25 on the left and more than 5 but less than 10 on the right - lag will be less but false signals will be more.


Thanks, of course, for the code, but it is, as you yourself understand, not the solution and not the problem.

I may have put it too succinctly, but it is actually quite a correct statement. It can be longer. What is required is the procedure for identification of a local extremum which operates in real time rather than on history. Identification means determination, upon completion of a bar, whether the appropriate point of the indicator chart is a point of local extremum. A local extremum is an extremum having both right and left change of the indicator value by at least 25.0

As far as the forthcoming change of the indicator to the right of the expected extremum point is unknown at the moment of bar completion, it is a question of optimal prediction of the indicator behavior. This prediction is not an extrapolation as the indicator values to the right of the extremum point are not of interest. The only condition is the condition of extremum, i.e. the indicator values will change by the conditioned value. Optimal prediction is understood in the statistical sense, i.e. the forecast should have a sufficiently high reliability.

Formally it all looks different, but I haven't said anything new for you. All this is already there in three words "identification without lag".

I would like to draw your attention to the fact that an elementary script for searching for extrema with given properties on a co-framed history could have been written more concisely and simply. Nested loops are an expensive overkill and will become a bottleneck for large arrays. All this can be done in one go, i.e. only one new value can be calculated for each new bar, without loops at all. And since you have designed your script as an indicator, you will loop on each new bar through the entire previous history - the calculation time increases by Bars*Bars/2 times. And, if you use the loop in the loop, it makes no sense to start the loop over j from j=i.

I haven't gone through your code in detail and haven't looked at it on the graph, but it seems to me that it contains one significant error - it changes its own result. If, for example, this point is an extremum point for some i, it may no longer be an extremum point when passing to (i+1) or further. This is, however, a result of the condition imposed by you: more than 5, less than 10.

For most of the story it does not matter. However it does for the right edge, and it matters a lot. That extremum identified by your script at the left of the zero bar can vanish at the next bar, which is not good. :-))

 
Yurixx:


1. Thank you, of course, for the code, but that, as you yourself understand, is not the solution and not the problem.

I may have put it too succinctly, but it's actually a fair enough statement. It could be longer. What is required is the procedure for identification of a local extremum, which operates in real time mode, not on the history. Identification means determination, upon completion of a bar, whether the appropriate point of the indicator chart is a point of local extremum. A local extremum is an extremum having both right and left change of the indicator value by at least 25.0

As far as the forthcoming change of the indicator to the right of the expected extremum point is unknown at the moment of bar completion, it is a question of optimal prediction of the indicator behavior. This prediction is not an extrapolation as the indicator values to the right of the extremum point are not of interest. The only condition is the condition of extremum, i.e. the indicator values will change by the conditioned value. Optimal prediction is understood in the statistical sense, i.e. the forecast should have a sufficiently high reliability.

Formally it all looks different, but I haven't said anything new for you. All this is already there in three words "identification without lag".

2. I would like to draw your attention to the fact that an elementary script to search for extrema with given properties on a co-framed history could have been written more succinctly and simply. Nested loops are an expensive overkill and will become a bottleneck for large arrays. All this can be done in one go, i.e. only one new value can be calculated for each new bar, without loops at all. And since you have designed your script as an indicator, you will loop on each new bar through the entire previous history - the calculation time increases by Bars*Bars/2 times. And if you use a loop in a loop, it makes no sense to start the loop over j from j=i.

3. I haven't dealt with your code in detail and haven't looked at it on the graph, but it seems to me that it contains one significant error - it changes its own result. If, for example, the point is an extremum point for some i, it may no longer be an extremum point when passing to (i+1) or further. This is, however, a result of the condition imposed by you: more than 5, less than 10.

For most of the story it does not matter. However it does for the right edge, and it matters a lot. That extremum identified by your script at the left of the zero bar can vanish at the next bar, which is not good. :-))

1. The task was to identify extrema, not to PREVENT their appearance. In short, cheap ponzi .... ...couldn't predict. ... It's the same as saying: give me a grail, so that there will be no moose at all and 1000%. That's exactly what I was writing about - the task must first have a single theoretical solution and then it is implemented in code. But the prediction does not have a single-valued solution.

By identification we mean defining whether the corresponding point of the indicator chart is a point of local extremum after the bar ends - Don't confuse God's blessing with an egg - identification and prediction.

"identification without lag" - again also. Identification without lag means identification at the very first moment in time, at which the situation is unambiguously identified.

2. Demonstrate and we'll see.

Bars*Bars/2 times - obviously you don't even understand how it works, or you don't know the meaning of the break operator;

itdoesn't make sense to start the loop on j from value j=i - but which one then? This is a most interesting question for you!!!!

I haven't dealt with your code in detail and haven't looked at it graphically, but it seems to me that it contains one significant error - it changes its own result.

3. Note that it only changes its readings depending on the zero bar, not yet formed. And all indicators change their last value according to the value on the zero bar. Have you ever seen the Fractals Indicator (built in MT (Main Menu - Indicators - Bill Williams - Fractals)) - Take a look, it's very interesting and fascinating, and may even be useful for you some day. The calculation of changes on the zero bar during the programming of indicators is at least the good manners rule, if not an inviolable rule of their programming. The first bar is usually limited to very inexperienced, not very deep into the essence of the indicator.

I never said the algorithm is perfect, there is a great reserve for its acceleration, we can limit the calculation of an indicator to a new bar only. But initially the task was only to identify an extremum by the criterion of changing the indicator value by a specified value and it has been solved, if we ignore your cheap jokes with substituting the notions of identification and prediction.

 
Integer:

... cheap ponce ....


As you like. :-)

Integer:

When one knows what one wants, it is done very quickly.

Apparently there has been a substitution of "one knows what one wants" and "one theoretical solution". Your concepts, by the way.

 
It's a good topic, it's a pity it's run out of steam.
For professional programmers, I would recommend digging the DLL from Elliottician products. They write their creations in VisualBasic, but the libraries have a description of waves and patterns with the usual notions of high, close, etc. Moreover, the latest versions of RET contain a plugin for Forex. And taking apart the DLL with the base of waves for the last 15 years is very tempting!
 
Bookkeeper:

Question: Is it possible to adjust the strategy to a risky, aggressive pipsetting not on the real,

but only on demo? The question is not just a question. It is possible with a pushy entry or with all the guts.

I think it is possible, have a look at the application.

I increased my deposit by 900% in a week.

My regards,

Alex Niroba.

Files:
statement.zip  9 kb
 
NYROBA >> :

I think it's possible, take a look at the app.

I increased my depo by 900% in a week.

Regards,

Alex Niroba.

yeah... long story, though.

;)

 
divenetz >>:
Хорошая тема, жаль выдохлась.
Для профпрограммистов я бы порекомендовал поковырять DLL от продуктов Elliottician. Они пишут свои творения на ВижуалВасике, но в библиотеках есть описание волн и патернов обычными понятиями high, close и пр. Тем более что последние версии RET содержат плагин для Forex. А разобрать DLL с базой волн за последние 15 лет - очень заманчиво!

RET is shit. Better modern75.nls to disassemble from ElWave (especially since it's an open file). RET is almost the same as trivial winwaves32.