Catching a reversal or correction - page 30

 
tara:

Note the Comment line in the top left-hand corner.

Is it the ratio of negative to positive trades? If not, sorry :o)
 
No, not the ratio. Profit in points.
 
Gone to chop some cabbage?
 
Not really... Waiting to see if there's anything to work on. The outputs are still under scrutiny...
 

My opinion : indicators with averaging ( wizards in particular ) are necessary !, but they should ONLY be used with a condition ( or indicator ) showing an instantaneous ( current and without delay ) price change ...

i meant to say that all oscillators and price scales sink ! (came across it in the thread on the previous page...)

 
atik:

My opinion : indicators with averaging ( wizards in particular ) are necessary !, but they should ONLY be used with a condition ( or induced ) showing instantaneous ( current and without delay ) price change ...

i meant to say that all oscillators and price scales sink ! (I stumbled upon it in a thread on the previous page...)

Any averaging requires constant optimization as it works in fragments. So, averaging is basically a self-deception. I agree that Tumblers, for instance, is a working tool, but variety of settings and timeframes absolutely kills any attraction. If the entire planet traded on Н1 and used Ma with a period of 359.65 and a shift of +38, everyone would be in the black :o).
 
I have a suspicion that there will be a trend prolongation in the form of correction, and here as usual a deadlock - the exit? I certainly ran away from the eurik, pound and franc, but it would be a shame to take only a fifth part.
 

I shorted eurik this morning, for example. I did not wait for a larger pullback. No stop or profit yet.

 

Here's the clarification on the two tentative targets (161 and 200%), and the share from the trend from above on the o.k. case.And so the standard 1-2-3 on the sell.

 

extern int int_bars1=250; //minimum number of extrema
extern double ch_max1=60; //maximum allowable channel height

Minimum number of bars from which the channel is looked for, and channel height should be selected depending on TF

The file is inserted, I put it like this

//+------------------------------------------------------------------+
//|                                          HL channel breakout.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

extern int min_bars1=80;                   //минималльное число екстремумов
extern double ch_max1=35;                   //максимально разрешаемая высота канала

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----  
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
   int i, t,k=0;
   double zz_ch=0, new_zz_ch=0;                                                  // высота подщитаного канала
   double PriceHigh=0, PriceLow=0;                                                      //Максимум и минимум канала (цены)                                                                
                                                            //число уже существующих вершин           
   for(k=min_bars1; k<100000; k++)                                           //цикл проверяющий высоту канала
    {
         
        PriceHigh = High[Highest(NULL, 0, MODE_HIGH, k, 0)];
        PriceLow = Low [Lowest (NULL, 0, MODE_LOW , k,0)];                    //Время первого екстрмума 
            if(PriceHigh-PriceLow<ch_max1*Point)           
               {
                  SetTLine(Red, "DNLine", Time[k], PriceLow, Time[0], PriceLow, false, 0, 3);           // чертим нижнюю линию          
                  SetTLine(Blue,"UPLine", Time[k], PriceHigh, Time[0], PriceHigh, false, 0, 3);          // чертим верхнюю линию 
                  SetTLine(Red, "DN161Line", Time[k], PriceLow-((PriceHigh-PriceLow)*0.61), Time[0], PriceLow-((PriceHigh-PriceLow)*0.61), false, 0, 1);           // чертим нижнюю линию          
                  SetTLine(Blue,"UP161Line", Time[k], PriceHigh+((PriceHigh-PriceLow)*0.61), Time[0], PriceHigh+((PriceHigh-PriceLow)*0.61), false, 0, 1);          // чертим верхнюю линию 
                  if(GlobalVariableCheck("H"))         GlobalVariableSet("H",PriceHigh);
                  if(GlobalVariableCheck("L"))         GlobalVariableSet("L",PriceLow);  
               }
            else break;                  
    }            
              
return(0);
}
//+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 12.10.2007                                                     |
//|  Описание : Установка объекта OBJ_TREND трендовая линия                    |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    cl - цвет линии                                                         |
//|    nm - наименование               (  ""  - время открытия текущего бара)  |
//|    t1 - время открытия бара        (  0   - Time[10]                       |
//|    p1 - ценовой уровень            (  0   - Low[10])                       |
//|    t2 - время открытия бара        (  0   - текущий бар)                   |
//|    p2 - ценовой уровень            (  0   - Bid)                           |
//|    ry - луч                        (False - по умолчанию)                  |
//|    st - стиль линии                (  0   - простая линия)                 |
//|    wd - ширина линии               (  1   - по умолчанию)                  |
//+----------------------------------------------------------------------------+
void SetTLine(color cl, string nm="",
              datetime t1=0, double p1=0, datetime t2=0, double p2=0,
              bool ry=False, int st=0, int wd=1) {
  if (nm=="") nm=DoubleToStr(Time[0], 0);
  if (t1<=0) t1=Time[10];
  if (p1<=0) p1=Low[10];
  if (t2<=0) t2=Time[0];
  if (p2<=0) p2=Bid;
  if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_TREND, 0, 0,0, 0,0);
  ObjectSet(nm, OBJPROP_TIME1 , t1);
  ObjectSet(nm, OBJPROP_PRICE1, p1);
  ObjectSet(nm, OBJPROP_TIME2 , t2);
  ObjectSet(nm, OBJPROP_PRICE2, p2);
  ObjectSet(nm, OBJPROP_COLOR , cl);
  ObjectSet(nm, OBJPROP_RAY   , ry);
  ObjectSet(nm, OBJPROP_STYLE , st);
  ObjectSet(nm, OBJPROP_WIDTH , wd);
}

//---------------------------------------------------------------------
//  Vizualizacija
//  Визуализация для отладки програмы
//-------------------------------------------------------------------- 
 int VisualDoubleToText(string name, string text, int y,double param, int digit )
 {  
            ObjectCreate(name, OBJ_LABEL, 0, 0, 0);
            ObjectSetText(name, text,12, "Verdana", White );
            ObjectSet(name, OBJPROP_XDISTANCE, 20);
            ObjectSet(name, OBJPROP_YDISTANCE, y);
            ObjectSet(name, OBJPROP_CORNER, 0); 
            ObjectCreate(name+"skaicius", OBJ_LABEL, 0, 0, 0);
            ObjectSetText(name+"skaicius", DoubleToStr(param,digit),12, "Verdana", White );
            ObjectSet(name+"skaicius", OBJPROP_XDISTANCE, 200);
            ObjectSet(name+"skaicius", OBJPROP_YDISTANCE, y);
            ObjectSet(name+"skaicius", OBJPROP_CORNER, 0); 
 }
 
 
  int VisualTimeToText(string name, string text, int y,datetime param, int mode )
 {  
            ObjectCreate(name, OBJ_LABEL, 0, 0, 0);
            ObjectSetText(name, text,12, "Verdana", White );
            ObjectSet(name, OBJPROP_XDISTANCE, 20);
            ObjectSet(name, OBJPROP_YDISTANCE, y);
            ObjectSet(name, OBJPROP_CORNER, 0); 
            ObjectCreate(name+"skaicius", OBJ_LABEL, 0, 0, 0);
            ObjectSetText(name+"skaicius", TimeToStr(param,mode),12, "Verdana", White );
            ObjectSet(name+"skaicius", OBJPROP_XDISTANCE, 200);
            ObjectSet(name+"skaicius", OBJPROP_YDISTANCE, y);
            ObjectSet(name+"skaicius", OBJPROP_CORNER, 0); 
 }