Always 21

Enlightenment. People did not know to spit or to swallow when I spoke about re-inventing the TTM wheel.

CounterForce52 with 18 sample is almost everything you would need on the hourly.

The last volatile print is the direction the sneeze is going to head to, and the timing knowledge obtained re: corrections can be well utilized. I’m talking of the 21 count.

See, the sneeze used to never come with a definite direction, it was merely called “continuation”. But the key is the volatility.

No volatility favors the bulls.

Which way is the next sneeze going to be disengaged to?

You need at least 2 hourly dots. Red or Orange. Ready or Not.

Macdulio Classics: CounterForce52

The sample size can be changed. I have 8, 12, 18 in use.

My idea of volatility is that it has a direction, a + or a – in front of it.

The dots were an after thought. A play on re-inventing Johannes Cartier’s TPM sneeze.

It is a bit of a challenge combining a histogram with arrow plots when zero is the lit value and EMPTY equals 2147483647 (0x7FFFFFFF). Had to go about it a different way and the displacement may be off depending on resolution / zoom.

#property copyright "Copyright © 2022, Macdulio" 
#property link      "https://forexfore.blog" 
#property description "V1.0"
#property description "Counter Force 52"
#property description "x-sample move maximum."
#property strict

//--- indicator settings
#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1  clrPink
#property indicator_color2  clrPowderBlue
#property indicator_color3  clrPurple
#property indicator_color4  clrBlue
#property indicator_color5  clrRed
#property indicator_color6  clrDarkKhaki
#property indicator_color7  clrWhite
#property indicator_level1 0
#property indicator_level2 52
#property indicator_level3 -52
#property indicator_levelcolor clrBlue
#property indicator_levelstyle STYLE_DOT

extern double valuetomonitor = 5.5;
extern int lookback = 1000;
extern int indicator_window = 2;
extern int sample = 12;
extern double FSize=32;
double upper[], middle[], lower[];
double avg;
double FMax = FSize*6/5;
double iHi4[];
double iLo4[];    
  string symbol = Symbol();  
double ExtATRBuffer[],ExtATRBuffer2[],ExtATRBuffer3[],ExtATRBuffer4[],ExtATRBuffer5[],stoch60[];
double corr[],corr2[], RSI2[], squeeze[];

int init(){
  
   SetIndexBuffer(0,ExtATRBuffer);   
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color1);
   SetIndexBuffer(1,ExtATRBuffer2);   
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color2);
     SetIndexBuffer(2,ExtATRBuffer3);   
   SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color3); 
        SetIndexBuffer(3,ExtATRBuffer4);   
   SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color4); 
   SetIndexBuffer(4,ExtATRBuffer5);   
   SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color5);
   
  // SetIndexBuffer(5,squeeze);
 //  SetIndexStyle(5,DRAW_ARROW,EMPTY,18,indicator_color5);
//SetIndexBuffer(1,squeeze);
//   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color5);

 //  SetIndexArrow(5,100);
  // SetIndexEmptyValue(5,0.0);
   return(0);
}

//+------------------------------------------------------------------+
//| Average True Range                                               |
//+------------------------------------------------------------------+
int start(){
  
  ArrayResize(ExtATRBuffer, Bars); 
  ArrayInitialize(ExtATRBuffer, EMPTY_VALUE);   
    ArrayResize(ExtATRBuffer2, Bars); 
  ArrayInitialize(ExtATRBuffer2, EMPTY_VALUE);   
      ArrayResize(ExtATRBuffer3, Bars); 
  ArrayInitialize(ExtATRBuffer3, EMPTY_VALUE);  
      ArrayResize(ExtATRBuffer4, Bars); 
  ArrayInitialize(ExtATRBuffer4, EMPTY_VALUE);  
     ArrayResize(ExtATRBuffer5, Bars); 
  ArrayInitialize(ExtATRBuffer5, EMPTY_VALUE);   
  ArrayResize(iHi4, Bars); 
  ArrayInitialize(iHi4, EMPTY_VALUE);   
  ArrayResize(iLo4, Bars); 
  ArrayInitialize(iLo4, EMPTY_VALUE);   
     ArrayResize(stoch60, Bars);   
 ArrayInitialize(stoch60,  EMPTY_VALUE);
  ArrayResize(RSI2, Bars);   
 ArrayInitialize(RSI2,  EMPTY_VALUE);
   ArrayResize(corr, Bars);   
 ArrayInitialize(corr,  EMPTY_VALUE);  
    ArrayResize(corr2, Bars);   
 ArrayInitialize(corr2,  EMPTY_VALUE);  
    ArrayResize(middle, Bars);   
 ArrayInitialize(middle,  EMPTY_VALUE);  
   ArrayResize(squeeze, Bars);   
 ArrayInitialize(squeeze,  0); 
  ArrayResize(upper, Bars);   
 ArrayInitialize(upper,  EMPTY_VALUE);  
 ArrayResize(lower, Bars);   
 ArrayInitialize(lower,  EMPTY_VALUE);  
    
   int i,j,k;

  for(i=Bars-100; i>=0; i--){ 
   
     if (Period()==240)   iHi4[i]=iMA(NULL,0,52,0,MODE_EMA, PRICE_HIGH,i);
     else if (Period()==30) iHi4[i]=iMA(NULL,0,414,0,MODE_EMA, PRICE_HIGH,i);
     else if (Period()==60) iHi4[i]=iMA(NULL,0,207,0,MODE_EMA, PRICE_HIGH,i);
     if (Period()==240)  iLo4[i]=iMA(NULL,0,52,0,MODE_EMA, PRICE_LOW,i);
     else if (Period()==30) iLo4[i]=iMA(NULL,0,414,0,MODE_EMA, PRICE_LOW,i);
     else if (Period()==60) iLo4[i]=iMA(NULL,0,207,0,MODE_EMA, PRICE_LOW,i);
      stoch60[i]=iStochastic(symbol,60,60,3,3,MODE_SMA,0,MODE_SIGNAL,i);
      RSI2[i]=iRSI(symbol,0,2,PRICE_MEDIAN,i);
}

deletetxt1("Pepper");
deletetxt1("Panace");
deletetxt1("PLOT");

for(i=lookback; i>=0; i--){ 
      middle[i] = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_TYPICAL, i);
      avg  = findAvg(20, i);
      upper[i] = middle[i] + avg;
      lower[i] = middle[i] - avg;
 
      if (iBands(symbol,0,18,1,0,PRICE_CLOSE,MODE_UPPER,i)<upper[i] && iBands(symbol,0,18,1,0,PRICE_CLOSE,MODE_LOWER,i)>lower[i]) 
      { ObjectCreate("PLOT"+i,OBJ_TEXT, indicator_window, Time[i], 8.5);
        ObjectSetText("PLOT"+i, CharToStr(108), 16, "WingDings", clrDarkBlue);
      }
     
      
      if (iBands(symbol,0,18,1.4,0,PRICE_CLOSE,MODE_UPPER,i)<upper[i] && iBands(symbol,0,18,1.4,0,PRICE_CLOSE,MODE_LOWER,i)>lower[i]) 
      { ObjectCreate("PLOT"+i,OBJ_TEXT, indicator_window, Time[i], 8.5);
        ObjectSetText("PLOT"+i, CharToStr(108), 16, "WingDings", clrRed);
      }
      
       if (iBands(symbol,0,18,1.8,0,PRICE_CLOSE,MODE_UPPER,i)<upper[i] && iBands(symbol,0,18,1.8,0,PRICE_CLOSE,MODE_LOWER,i)>lower[i]) 
      { ObjectCreate("PLOT"+i,OBJ_TEXT, indicator_window, Time[i], 8.5);
        ObjectSetText("PLOT"+i, CharToStr(108), 16, "WingDings", clrOrange);
      }
      
 
 ExtATRBuffer[i]= -1*(iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,sample-1,i+1))-Low[i])*10000;
 if (ExtATRBuffer[i]<-80) ExtATRBuffer[i]=-80;
 ExtATRBuffer2[i]=(High[i]-iLow(symbol,0,iLowest(symbol,0,MODE_LOW,sample-1,i+1)))*10000;
 if (ExtATRBuffer2[i]>80) ExtATRBuffer2[i]=80;
 if (ExtATRBuffer[i]<-52 && ExtATRBuffer[i]>-58) ExtATRBuffer4[i]=ExtATRBuffer[i];
 else if (ExtATRBuffer2[i]>52 && ExtATRBuffer2[i]<58) ExtATRBuffer4[i]=ExtATRBuffer2[i]; 
 if (ExtATRBuffer[i]<-58) ExtATRBuffer3[i]=ExtATRBuffer[i];
 else if (ExtATRBuffer2[i]>58) ExtATRBuffer3[i]=ExtATRBuffer2[i]; 
 

if (Period()==60){ 
  
    
 
 
    
 
  corr[i]=corr[i+1];
   corr2[i]=corr2[i+1];
   if (ExtATRBuffer4[i+6]!=EMPTY_VALUE) {corr[i]=iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,60,i))-1360*Point; corr2[i]=iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,60,i))-2100*Point;} 
   if (ExtATRBuffer5[i+6]!=EMPTY_VALUE) {corr[i]=iLow(symbol,0,iLowest(symbol,0,MODE_LOW,60,i))+1360*Point; corr2[i]=iLow(symbol,0,iLowest(symbol,0,MODE_LOW,60,i))+2100*Point;}
 
 

}

}

deletetxt1("AverD");

int twodigits = NormalizeDouble(ExtATRBuffer2[0],0);

if (MathAbs(ExtATRBuffer[0])>ExtATRBuffer2[0]) twodigits = NormalizeDouble(MathAbs(ExtATRBuffer[0]),0);

//string tds = IntegerToString(twodigits);

int tens = round(twodigits/10);

int ones = twodigits-tens*10; 

string stens, sones;

//Print("tens=",tens);
//Print("ones=",ones);


switch(tens)
{
case  1:   stens=CharToStr(140);
        break;
case  2:   stens=CharToStr(141);
        break;
case  3:   stens=CharToStr(142);
        break;        
case  4:   stens=CharToStr(143);
        break;
case  5:   stens=CharToStr(144);
        break;
case  6:   stens=CharToStr(145);
        break;        
case  7:   stens=CharToStr(146);
        break;                
case  8:   stens=CharToStr(147);
        break;                        
case  9:   stens=CharToStr(148);
        break;                      
  default: stens=CharToStr(139);
      break;
  }
  
//deletetxt1("AverD");

switch(ones)
{
case  1:   sones=CharToStr(140);
        break;
case  2:   sones=CharToStr(141);
        break;
case  3:   sones=CharToStr(142);
        break;        
case  4:   sones=CharToStr(143);
        break;
case  5:   sones=CharToStr(144);
        break;
case  6:   sones=CharToStr(145);
        break;        
case  7:   sones=CharToStr(146);
        break;                
case  8:   sones=CharToStr(147);
        break;                        
case  9:   sones=CharToStr(148);
        break;                      
  default: sones=CharToStr(139);
      break;
  }

 
string jointstring=stens+sones;

//if (Close[0]>plus[0] && buy[1]) jointstring=jointstring+CharToStr(66);
//else if (Close[0]>plus[0] && sell[1]) jointstring=jointstring+CharToStr(73);

//if (Close[0]<minus[0] && sell[1]) jointstring=jointstring+CharToStr(66);
//else if (Close[0]<minus[0] && buy[1]) jointstring=jointstring+CharToStr(73);

  //    ObjectCreate("AverD", OBJ_TEXT, indicator_window, Time[16], 1); 

//ObjectCreate("AverD",OBJ_LABEL,indicator_window, 0,0);

//ObjectSet("AverD",OBJPROP_CORNER,3);
//    ObjectSet("AverD",OBJPROP_XDISTANCE,20);
//  ObjectSet("AverD",OBJPROP_YDISTANCE,27);
  
//ObjectSetText("AverD",jointstring,40,"Wingdings",DimGray);
//if (twodigits>30)  ObjectSetText("AverD",jointstring,40,"Wingdings",Yellow);  
//if (twodigits>58)  ObjectSetText("AverD",jointstring,40,"Wingdings",DeepPink);  

    

deletetxt1("Crush");  
deletetxt1("Leap");  
deletetxt1("Frog"); 
deletetxt1("Countess");
deletetxt1("Missing");
deletetxt1("KAROLY");
  
int counter = 9;  
  
for(i=lookback; i>=0; i--){   
  if (counter>-1) counter++;
      if (( (ExtATRBuffer[i+7]<1.8 && ExtATRBuffer[i+6]<1.8  && ExtATRBuffer[i+5]<1.8 && ExtATRBuffer[i+4]<1.8 && ExtATRBuffer[i+3]<1.8 && ExtATRBuffer[i+2]<1.8 && ExtATRBuffer[i+1]>1.8 && ExtATRBuffer[i]<1.8) ||    
      (ExtATRBuffer[i+9]>1.1 && ExtATRBuffer[i+8]>1.1 && ExtATRBuffer[i+7]>1.1 && ExtATRBuffer[i+6]>1.1 && ExtATRBuffer[i+5]>1.1 && ExtATRBuffer[i+9]<2.1 && ExtATRBuffer[i+8]<2.1 && ExtATRBuffer[i+7]<2.1 && ExtATRBuffer[i+6]<2.1 && ExtATRBuffer[i+5]<2.1 && ExtATRBuffer[i+4]<2.1 && ExtATRBuffer[i+3]<2.1 && ExtATRBuffer[i+1]>2.1 && ExtATRBuffer[i]<2.1) ||
      (ExtATRBuffer[i+9]>1.1 && ExtATRBuffer[i+8]>1.1 && ExtATRBuffer[i+7]>1.1 && ExtATRBuffer[i+6]>1.1 && ExtATRBuffer[i+5]>1.1 && ExtATRBuffer[i+7]<2.4 && ExtATRBuffer[i+5]<2.4 && ExtATRBuffer[i+3]<2.4 && ExtATRBuffer[i+1]>2.4 && ExtATRBuffer[i]<2.4) ||  
       (ExtATRBuffer[i+5]<3 && ExtATRBuffer[i+3]<3 && ExtATRBuffer[i+1]>3 && ExtATRBuffer[i]<3) ||  (ExtATRBuffer[i+5]<3.6 && ExtATRBuffer[i+3]<3.6 && ExtATRBuffer[i+1]>3.6 && ExtATRBuffer[i]<3.6) ||  
       (ExtATRBuffer[i+5]<3.9 && ExtATRBuffer[i+3]<3.9 && ExtATRBuffer[i+1]>3.9 && ExtATRBuffer[i]<3.9) ||  
       (ExtATRBuffer[i+9]>1.1 && ExtATRBuffer[i+8]>1.1 && ExtATRBuffer[i+7]>1.1 && ExtATRBuffer[i+6]>1.1 && ExtATRBuffer[i+5]>1.1 && ExtATRBuffer[i+7]<valuetomonitor && ExtATRBuffer[i+5]<valuetomonitor && ExtATRBuffer[i+3]<valuetomonitor && ExtATRBuffer[i+1]>valuetomonitor && ExtATRBuffer[i]<valuetomonitor) ||  
       (ExtATRBuffer[i+3]<4.5 && ExtATRBuffer[i+1]>4.5 && ExtATRBuffer[i]<4.5) ||  (ExtATRBuffer[i+3]<5 && ExtATRBuffer[i+1]>5 && ExtATRBuffer[i]<5)) && ExtATRBuffer[i]>1.7 ) {
           
           
           if ((i<80 && Period()==240) || (Period()<240)){
             ObjectCreate("Crushi"+i,OBJ_TEXT, indicator_window, Time[i+2], ExtATRBuffer[i]);
            ObjectCreate("Crush"+i,OBJ_TEXT, indicator_window, Time[i+2], ExtATRBuffer[i]);
           ObjectCreate("Crushy"+i,OBJ_TEXT, indicator_window, Time[i+2], ExtATRBuffer[i]-1);
             ObjectCreate("Crushd"+i,OBJ_TEXT, indicator_window, Time[i+2], ExtATRBuffer[i]-1);
              
       
       if (Close[i]<iLo4[i] )  {ObjectSetText("Crushi"+i, "Vol Crush > ", 21, "Impact", clrWhite); ObjectSetText("Crush"+i, "Vol Crush -> ", 19, "Impact", clrNavy); ObjectSetText("Crushy"+i,DoubleToStr(NormalizeDouble(iHi4[i],4),4), 21, "Impact", clrWhite); ObjectSetText("Crushd"+i, DoubleToStr(NormalizeDouble(iHi4[i],4),4), 19, "Impact", clrNavy);   }
       
       else if (Close[i]>iHi4[i] ) { ObjectSetText("Crushi"+i, "Vol Crush > ", 21, "Impact", clrWhite); ObjectSetText("Crush"+i, "Vol Crush -> ", 19, "Impact", clrNavy);  ObjectSetText("Crushy"+i, DoubleToStr(NormalizeDouble(iLo4[i],4),4), 21, "Impact", clrWhite); ObjectSetText("Crushd"+i, DoubleToStr(NormalizeDouble(iLo4[i],4),4), 19, "Impact", clrNavy);  }
         
      }}      

    //  if (ExtATRBuffer[i]-ExtATRBuffer[i+4]>1 && !(ExtATRBuffer[i+1]-ExtATRBuffer[i+5]>1) && Period()!=240){   
    //        ObjectCreate("Leap"+i,OBJ_TEXT, indicator_window, Time[i], ExtATRBuffer[i]-0.5);
    //        ObjectSetText("Leap"+i, "+1", 19, "Impact", clrWhite);  
    //  }
     
    //   if (ExtATRBuffer[i+4]-ExtATRBuffer[i]>1 && !(ExtATRBuffer[i+5]-ExtATRBuffer[i+1]>1 ) && Period()!=240){   
   //         ObjectCreate("Leap"+i,OBJ_TEXT, indicator_window, Time[i], ExtATRBuffer[i+4]-0.5);
   //         ObjectSetText("Leap"+i, "-1", 19, "Impact", clrWhite);  
   //   } 
      
      
 //     if (Period()==240 
      
      //&& ExtATRBuffer[i+4]>ExtATRBuffer[i+3]-1 
 //    && ExtATRBuffer[i+5]<ExtATRBuffer[i+3] && ((ExtATRBuffer[i+6]<ExtATRBuffer[i+3] 
 //     && ExtATRBuffer[i+7]<ExtATRBuffer[i+3] && ExtATRBuffer[i+8]<ExtATRBuffer[i+3]
      
  //    )  ||   (ExtATRBuffer[i+7]==EMPTY_VALUE || ExtATRBuffer[i+6]==EMPTY_VALUE || ExtATRBuffer[i+8]==EMPTY_VALUE ))
    //  
 //     && ExtATRBuffer[i+4]<ExtATRBuffer[i+3] && ExtATRBuffer[i+3]>ExtATRBuffer[i+2] && ExtATRBuffer[i+2]>ExtATRBuffer[i+1] && ExtATRBuffer[i+1]>ExtATRBuffer[i] && ExtATRBuffer[i+2]>1 &&  ExtATRBuffer[i+1]>1 && ExtATRBuffer[i+3]!=EMPTY_VALUE && ExtATRBuffer[i+2]!=EMPTY_VALUE && ExtATRBuffer[i+1]!=EMPTY_VALUE && ExtATRBuffer[i]!=EMPTY_VALUE){
      
          
          
    //       if (ExtATRBuffer[i+3]-ExtATRBuffer[i]>1.6) { ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+3],ExtATRBuffer[i+3]+0.8,Time[i],ExtATRBuffer[i]+0.8); ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color5);}
   //      else {ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+3],ExtATRBuffer[i+3]+0.2,Time[i],ExtATRBuffer[i]+0.2);
   //        ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color4);  counter=0;}
    //       ObjectSetInteger(0,"Frog"+i,OBJPROP_RAY_RIGHT,false);
    //     ObjectSet("Frog"+i,OBJPROP_WIDTH,8); 
     //    ObjectSet("Frog"+i,OBJPROP_BACK,1); 
         
       
  //    }
      
      
  //    else  if (Period()==240 
          
  //    && ExtATRBuffer[i+6]<ExtATRBuffer[i+3] 
      //&& ExtATRBuffer[i+5]<ExtATRBuffer[i+3] 
  //     && ExtATRBuffer[i+7]<ExtATRBuffer[i+3] && ExtATRBuffer[i+8]<ExtATRBuffer[i+3]
      
 //     && ExtATRBuffer[i+4]>ExtATRBuffer[i+1] && 
 //     ExtATRBuffer[i+2]>ExtATRBuffer[i+1] && ExtATRBuffer[i+1]>ExtATRBuffer[i] && ExtATRBuffer[i+2]>1 &&  ExtATRBuffer[i+1]>1 && ExtATRBuffer[i+3]!=EMPTY_VALUE && ExtATRBuffer[i+2]!=EMPTY_VALUE && ExtATRBuffer[i+1]!=EMPTY_VALUE && ExtATRBuffer[i]!=EMPTY_VALUE && ExtATRBuffer[i+4]!=EMPTY_VALUE){
      
          
          
       //   if (ExtATRBuffer[i+4]-ExtATRBuffer[i]>1.5) {   ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+4],ExtATRBuffer[i+4]+0.8,Time[i],ExtATRBuffer[i]+0.8); ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color5);}
       //   else {ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+4],ExtATRBuffer[i+4]+0.2,Time[i],ExtATRBuffer[i]+0.2);
        //   ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color4);  counter=0;}
      //     ObjectSetInteger(0,"Frog"+i,OBJPROP_RAY_RIGHT,false);
      //  ObjectSet("Frog"+i,OBJPROP_WIDTH,8); 
     //    ObjectSet("Frog"+i,OBJPROP_BACK,1); 
     
    //  counter=0;
   //   } 
      
      
   //    else   if (Period()==240 
      
      //&& ExtATRBuffer[i+4]>ExtATRBuffer[i+3]-1 
   //   && ExtATRBuffer[i]<3.1
      //&& ExtATRBuffer[i]>1.6
      
  //    && ExtATRBuffer[i+5]<ExtATRBuffer[i+3] && ((ExtATRBuffer[i+6]<ExtATRBuffer[i+3] && ExtATRBuffer[i+7]<ExtATRBuffer[i+3] && ExtATRBuffer[i+8]<ExtATRBuffer[i+3])  ||   (ExtATRBuffer[i+7]==EMPTY_VALUE || ExtATRBuffer[i+6]==EMPTY_VALUE || ExtATRBuffer[i+8]==EMPTY_VALUE ))
      
  //    && ExtATRBuffer[i+2]>ExtATRBuffer[i+1] && ExtATRBuffer[i+1]>ExtATRBuffer[i] && ExtATRBuffer[i+2]>1 &&  ExtATRBuffer[i+1]>1 && ExtATRBuffer[i+3]!=EMPTY_VALUE && ExtATRBuffer[i+2]!=EMPTY_VALUE && ExtATRBuffer[i+1]!=EMPTY_VALUE && ExtATRBuffer[i]!=EMPTY_VALUE){
      
        
          
   //        if (ExtATRBuffer[i+2]-ExtATRBuffer[i]>1.8)  {ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+2],ExtATRBuffer[i+2]+0.8,Time[i],ExtATRBuffer[i]+0.8); ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color5);}
 //       else {  ObjectCreate(0,"Frog"+i,OBJ_TREND,indicator_window,Time[i+2],ExtATRBuffer[i+2]+0.2,Time[i],ExtATRBuffer[i]+0.2);
    //       ObjectSet("Frog"+i,OBJPROP_COLOR,indicator_color4);  counter=0;}
      //     ObjectSetInteger(0,"Frog"+i,OBJPROP_RAY_RIGHT,false);
     //    ObjectSet("Frog"+i,OBJPROP_WIDTH,8); 
     //    ObjectSet("Frog"+i,OBJPROP_BACK,1); 
      
  //    counter = 0;
  //    }
      
      
           if (counter>0 && counter<4){
            if (ExtATRBuffer[i]<=2.5 || ExtATRBuffer[i]==EMPTY_VALUE) ObjectCreate("Countess"+i,OBJ_TEXT, indicator_window, Time[i], ExtATRBuffer[i+3]+.25);
            else ObjectCreate("Countess"+i,OBJ_TEXT, indicator_window, Time[i], 3.2);
               if (counter==3) ObjectSetText("Countess"+i, IntegerToString(counter,1,0), 19, "Arial Black", clrMagenta);
                 else ObjectSetText("Countess"+i, IntegerToString(counter,1,0), 19, "Arial Black", clrBlack);
               }
      
      
      if (counter==3 && Low[i+3]<iMA(NULL,240,52,0,MODE_EMA, PRICE_MEDIAN,i+3) && ((Low[i]>Low[i+3] && Low[i+1]>Low[i+3] && Low[i+2]>Low[i+3]) || (Low[i]>Low[i+4] && Low[i+1]>Low[i+4] && Low[i+2]>Low[i+4]))  ){
      //
     
        
        if (i>1) {
        
        j=i-1;
        
        while (j>0){
         if (Low[j]<iLow(symbol,240,iLowest(symbol,240,MODE_LOW,6,i+3))) break;
         j--;}
        
         if (j==0) {
               ObjectCreate("KAROLY"+DoubleToStr(i), OBJ_RECTANGLE, 0, Time[i+2], iLow(symbol,240,iLowest(symbol,240,MODE_LOW,6,i+3)) , Time[i], iLow(symbol,240,iLowest(symbol,240,MODE_LOW,6,i+3))-FSize/2*10*Point);
              ObjectSetInteger(0,"KAROLY"+DoubleToStr(i),OBJPROP_COLOR,indicator_color6);
        
        
         k=i+3;
         while (k<i+40){
            if (iFractals(symbol,240,MODE_LOWER,k) && Low[k]<iLow(symbol,240,iLowest(symbol,240,MODE_LOW,3,i))) break; 
            k++;
         }   
            
        
        if (k<i+40){
            ObjectCreate("Missingg"+i,OBJ_TEXT, indicator_window, Time[i+3], ExtATRBuffer[i+2]+.5);
        ObjectSetText("Missingg"+i, " Missing B: "+DoubleToStr(NormalizeDouble(iLow(symbol,0,iLowest(symbol,0,MODE_LOW,7,i+1)),4),4), 16, "Arial Black", clrWhite);
        ObjectCreate("Missing"+i,OBJ_TEXT, indicator_window, Time[i+3], ExtATRBuffer[i+2]+.5);
        ObjectSetText("Missing"+i, "Missing B: "+DoubleToStr(NormalizeDouble(iLow(symbol,0,iLowest(symbol,0,MODE_LOW,7,i+1)),4),4), 16, "Arial Black", clrBlack);
        
             ObjectDelete(0,"Trendex3_1"+DoubleToStr(k));
             ObjectCreate(0,"Trendex3_1"+DoubleToStr(k),OBJ_TREND,0,Time[k],Low[k],Time[iLowest(symbol,240,MODE_LOW,3,i)],iLow(symbol,240,iLowest(symbol,240,MODE_LOW,3,i)));
             ObjectSetInteger(0,"Trendex3_1"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_COLOR,indicator_color1);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_BACK,1);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_WIDTH,6); 
             ObjectDelete(0,"Trendex3_2"+DoubleToStr(k));
             ObjectCreate(0,"Trendex3_2"+DoubleToStr(k),OBJ_TREND,0,Time[k],Low[k],Time[iLowest(symbol,240,MODE_LOW,3,i)],iLow(symbol,240,iLowest(symbol,240,MODE_LOW,3,i)));
             ObjectSetInteger(0,"Trendex3_2"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_COLOR,indicator_color7);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_BACK,1);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_WIDTH,3); 
       
        }
        
        }
        }
      }
      
          if (counter==3 && High[i+3]>iMA(NULL,240,52,0,MODE_EMA, PRICE_MEDIAN,i+3) && (( High[i]<High[i+3] && High[i+1]<High[i+3] && High[i+2]<High[i+3]) || (High[i]<High[i+4] && High[i+1]<High[i+4] && High[i+2]<High[i+4]))  ){
      //
         
        
        
         if (i>1) {
        
        j=i-1;
        
        while (j>0){
         if (High[j]>iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,6,i+3))) break;
         j--;}
        
         if (j==0) {
        
        
        ObjectCreate("KAROLY"+DoubleToStr(i), OBJ_RECTANGLE, 0, Time[i+2], iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,6,i+3)) , Time[i], iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,6,i+3))+FSize/2*10*Point);
         ObjectSetInteger(0,"KAROLY"+DoubleToStr(i),OBJPROP_COLOR,indicator_color6);
         
         
         k=i+3;
         while (k<i+40){
            if (iFractals(symbol,240,MODE_UPPER,k) && High[k]>iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,6,i+3))) break; 
            k++;
         }   
            
        
        if (k<i+40){
         ObjectCreate("Missingg"+i,OBJ_TEXT, indicator_window, Time[i+3], ExtATRBuffer[i+2]+.5);
        ObjectSetText("Missingg"+i, " Missing B: "+DoubleToStr(NormalizeDouble(iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,7,i+1)),4),4), 16, "Arial Black", clrWhite);
        ObjectCreate("Missing"+i,OBJ_TEXT, indicator_window, Time[i+3], ExtATRBuffer[i+2]+.5);
        ObjectSetText("Missing"+i, "Missing B: "+DoubleToStr(NormalizeDouble(iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,7,i+1)),4),4), 16, "Arial Black", clrBlack);
        
             ObjectDelete(0,"Trendex3_1"+DoubleToStr(k));
             ObjectCreate(0,"Trendex3_1"+DoubleToStr(k),OBJ_TREND,0,Time[k],Low[k],Time[iHighest(symbol,240,MODE_HIGH,3,i)],iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,3,i)));
             ObjectSetInteger(0,"Trendex3_1"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_COLOR,indicator_color5);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_BACK,1);
             ObjectSet("Trendex3_1"+DoubleToStr(k),OBJPROP_WIDTH,6); 
             ObjectDelete(0,"Trendex3_2"+DoubleToStr(k));
             ObjectCreate(0,"Trendex3_2"+DoubleToStr(k),OBJ_TREND,0,Time[k],Low[k],Time[iHighest(symbol,240,MODE_HIGH,3,i)],iHigh(symbol,240,iHighest(symbol,240,MODE_HIGH,3,i)));
             ObjectSetInteger(0,"Trendex3_2"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_COLOR,indicator_color7);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_BACK,1);
             ObjectSet("Trendex3_2"+DoubleToStr(k),OBJPROP_WIDTH,3); 
       
        } 
         
      } 
      
      }
     } 
    
      
}

double rou=0;
double rod=0;

if (Period()==30){
deletetxt1("Libec");

i=0;
while(i<10){
   if (High[i]-iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,i)>rou) rou=High[i]-iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,i);
   if (iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,i)-Low[i]>rod) rod=iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,i)-Low[i];
i++;
}

  ObjectCreate("Libec"+4,OBJ_LABEL,indicator_window, 0,0);
   ObjectSetText("Libec"+4, DoubleToStr(rou*10000,2)+" ("+DoubleToStr(iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,0)+rou,4)+")", 11, "Arial Black", DarkViolet);  
  ObjectSet("Libec"+4,OBJPROP_CORNER,2);
    ObjectSet("Libec"+4,OBJPROP_XDISTANCE,20);
  ObjectSet("Libec"+4,OBJPROP_YDISTANCE,67);
  if (rou>rod) ObjectSet("Libec"+4,OBJPROP_COLOR,clrDarkGreen);
  else if (rou<.0010) ObjectSet("Libec"+4,OBJPROP_COLOR,clrGray);
   else ObjectSet("Libec"+4,OBJPROP_COLOR,clrBlack);
  


  ObjectCreate("Libec"+5,OBJ_LABEL,indicator_window, 0,0);
   ObjectSetText("Libec"+5,DoubleToStr(rod*10000,2)+" ("+DoubleToStr(iMA(NULL,0,17,0,MODE_EMA, PRICE_MEDIAN,0)-rod,4)+")", 11, "Arial Black", DarkViolet);  
  ObjectSet("Libec"+5,OBJPROP_CORNER,2);
    ObjectSet("Libec"+5,OBJPROP_XDISTANCE,20);
  ObjectSet("Libec"+5,OBJPROP_YDISTANCE,47);
  if (rod>rou) ObjectSet("Libec"+5,OBJPROP_COLOR,clrCrimson); 
  else if (rod<.0010) ObjectSet("Libec"+5,OBJPROP_COLOR,clrGray);
   else ObjectSet("Libec"+5,OBJPROP_COLOR,clrBlack);

}

//ObjectCreate("Libec"+6,OBJ_LABEL,1, 0,0);
// ObjectSetText("Libec"+6, "W2", 41, "Arial Black", Violet);  
// ObjectSet("Libec"+6,OBJPROP_CORNER,3);
// ObjectSet("Libec"+6,OBJPROP_XDISTANCE,20);
// ObjectSet("Libec"+6,OBJPROP_YDISTANCE,67);
// ObjectSet("Libec"+6,OBJPROP_BACK,1);


// ObjectCreate("Libec"+6,OBJ_LABEL,indicator_window, 2,0);
//      ObjectSetText("Libec"+6,"Deployment on muted, capped side (30-x)",12,"Impact");
//  ObjectSet("Libec"+6,OBJPROP_CORNER,1);
//    ObjectSet("Libec"+6,OBJPROP_XDISTANCE,35);
//  ObjectSet("Libec"+6,OBJPROP_YDISTANCE,87);
// ObjectSet("Libec"+6,OBJPROP_COLOR,clrTeal);

//ObjectCreate("Libec"+7,OBJ_LABEL,indicator_window, 2,0);
//      ObjectSetText("Libec"+7,"Adding on ZERO after D|",12,"Impact");
//  ObjectSet("Libec"+7,OBJPROP_CORNER,1);
//    ObjectSet("Libec"+7,OBJPROP_XDISTANCE,35);
//  ObjectSet("Libec"+7,OBJPROP_YDISTANCE,107);
// ObjectSet("Libec"+7,OBJPROP_COLOR,clrTeal);


  return(0);
}
//+------------------------------------------------------------------+
   void deletetxt1(string text){
   for(int iObj=ObjectsTotal()-1; iObj >= 0; iObj--){
      string   on = ObjectName(iObj);
      if(StringFind(on, text) == 0)  ObjectDelete(on);
}  }

   double findAvg(int period, int shift) {
      double sum=0;
      for (int x=shift;x<(shift+period);x++) {     
         sum += High[x]-Low[x];
      }
      sum = sum/period;
      return (sum);
   }

My boney is over the whelming.

Where in the world can I get some dirt?

Macdulio Classics: MFI

Didn’t I just teach you about Wave 4 absorption?

What was it that the next 4H print wasn’t able to do following the wave 5’s volaility outburst? (Think Hard!)

What comes after the divergent leg? Volatility whip that would take out the last daily swing high.

EmPuhE where Wave 3’s end was the Measuring Leg and the Wave 5 Divergent Leg made a Push & Echo divergence.

Anyways, my MFI plots the range over the given timeframe with 10 pips allowance for turn until hiting the limit.

I personally believe that the 14-sample is best fit for the 30 nin and the 4H.

////MFI by Macdulio
#property copyright   "MFI by Macdulio, (c) 2021"
#property link        "http://www.forexfore.blog"
#property description "MFI by Macdulio"
#property strict

#property indicator_separate_window
//separate_window
#property indicator_minimum    -50
#property indicator_maximum    50
#property indicator_buffers    3
#property indicator_level1 0
#property indicator_levelcolor clrYellow
#property indicator_levelstyle STYLE_DOT
#property indicator_levelwidth 1
extern int indicator_window = 1;
extern int lookback = 200;
extern bool plot_ellipses=false;

string symbol = Symbol();
double RSI2[],Cumulative[], VWAP[], VWAPP[], VWAPN[], Cumvol[];

//---- buffers
double MFI[],MFINEG[], MFIAVG[], AVG[];

int init()
  {
   SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,5,Green);
   SetIndexBuffer(1,MFI);
   
    SetIndexStyle(2,DRAW_HISTOGRAM,EMPTY,5,Crimson);
   SetIndexBuffer(2,MFINEG);
   
      SetIndexBuffer(0,MFIAVG);
   SetIndexStyle(0,DRAW_LINE,EMPTY,3,clrBlack); 

      SetIndexBuffer(3,VWAPN);
   SetIndexStyle(3,DRAW_LINE,4,3,clrDeepPink); 
    
         SetIndexBuffer(4,VWAPP);
   SetIndexStyle(4,DRAW_LINE,4,3,clrTeal); 
   
      SetIndexBuffer(5,AVG);
   SetIndexStyle(5,DRAW_LINE,4,3,Black); 

   return(0);  
}
  

int start()
{ 
ArrayResize(RSI2, Bars);   
ArrayInitialize(RSI2, 0); 
ArrayResize(Cumulative, Bars);   
ArrayInitialize(Cumulative, 0); 
ArrayResize(Cumvol, Bars);   
ArrayInitialize(Cumvol, 0);
ArrayResize(MFI, Bars);   
ArrayInitialize(MFI, EMPTY_VALUE); 
ArrayResize(MFINEG, Bars);   
ArrayInitialize(MFINEG, EMPTY_VALUE); 
ArrayResize(MFIAVG, Bars);   
ArrayInitialize(MFIAVG, EMPTY_VALUE); 
ArrayResize(VWAP, Bars);   
ArrayInitialize(VWAP, 0);
ArrayResize(VWAPP, Bars);   
ArrayInitialize(VWAPP, EMPTY_VALUE);
ArrayResize(AVG, Bars);   
ArrayInitialize(AVG, EMPTY_VALUE);
ArrayResize(VWAPN, Bars);   
ArrayInitialize(VWAPN, EMPTY_VALUE);

   
int    i,j,k;
 
for(i=Bars-60; i>=0; i--){
  RSI2[i]=iRSI(symbol,0,2,PRICE_MEDIAN,i);
   if (i<=lookback){
    for (j=i; j<i+14; j++) 
      Cumulative[i]=Cumulative[i]+Volume[j]*((High[j]+Low[j]+Close[j])/3);
       Cumulative[i]=Cumulative[i]/14;
       Cumvol[i]=Cumvol[i]+Volume[j];
  }
}

for (i = lookback; i >=0; i--) {
  MFI[i]=iMFI(symbol,0,14,i)-50;
  if (MFI[i]<0) MFINEG[i]=MFI[i];
  VWAP[i]=(Cumulative[i]/Cumvol[i]*50-75); 
  if (VWAP[i]<VWAP[i+1]) VWAPN[i]=VWAP[i];
  if (VWAP[i]>VWAP[i+1]) VWAPP[i]=VWAP[i];
  if (i<lookback-5){
      AVG[i]=((MFI[i]+MFI[i+1]+MFI[i+3]+MFI[i+4]+MFI[i+5])/5);
      MFIAVG[i]=((MFI[i]+MFI[i+1])/2);
  }
}



deletetxt1("Cinnamon");
deletetxt1("Cinnabon");
deletetxt1("REVERGENCE");
deletetxt1("Ditty");


for (i = lookback-2 ; i >0; i--) {
   if (MFI[i]<MFI[i+1] && MFI[i+1]<MFI[i+2] && MFI[i]>0 && MFI[i-1]>0 && MFI[i-1]>MFI[i] && i>0){
   
      if (i<56) ObjectCreate("Cinnamon"+IntegerToString(i), OBJ_RECTANGLE, 0,  Time[i+1], High[i+1]+100*Point, Time[0], High[i+1]+150*Point);
      else  ObjectCreate("Cinnamon"+IntegerToString(i), OBJ_RECTANGLE, 0,  Time[i+1], High[i+1]+100*Point, Time[i-1], High[i+1]+150*Point);
          
           if (Close[0]>High[i+1]+50*Point) ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrLimeGreen);
      else if (Close[0]<High[i+1]+200*Point) ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrTomato);
       else   ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrGoldenrod);
          ObjectSet("Cinnamon"+IntegerToString(i),OBJPROP_BACK,1);
          ObjectSet("Cinnamon"+IntegerToString(i),OBJPROP_WIDTH,1);
          
          if (Period()==1440 && i<56){
               ObjectCreate("CinnamonXY"+IntegerToString(i), OBJ_TEXT, 0, Time[0], High[i+1]+450*Point); 
                     ObjectSetText("CinnamonXY"+IntegerToString(i), "          +-100!", 22, "Arial Black", clrMagenta);
               }
          
          
       j=i-1;
         while(j>0){
         if (High[j]>High[i-1] && High[j]>High[i+1]+125*Point && High[j]<High[i+1]+360*Point && Low[j]<High[i+1]+125*Point) break;
         j--;
        }
         if (j>0 && Period()==1440) {
                      ObjectCreate("Cinnabon"+IntegerToString(j), OBJ_TEXT, 0, Time[j+1], High[j]+60*Point); 
                     ObjectSetText("Cinnabon"+IntegerToString(j), "BuyStop:"+DoubleToStr(NormalizeDouble(High[j]+80*Point,4),4), 12, "Impact", clrNavy);
                     
                     ObjectCreate("Cinnabonn"+IntegerToString(j), OBJ_TEXT, indicator_window, Time[j], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(j), "R2MA", 12, "Impact", clrBlue);
         } 
         
                k=j-1;
         while(k>0){
         if (High[k]>High[j]+50*Point && High[k-1]<High[k] && High[k]<High[k]-160*Point && Low[k]<High[j]) break;
         k--;
        }
         if (k>0 && Period()==1440) {
                      ObjectCreate("Cinnabon"+IntegerToString(k), OBJ_TEXT, 0, Time[k+1], High[k]+150*Point); 
                     ObjectSetText("Cinnabon"+IntegerToString(k), "BuyStop:"+DoubleToStr(NormalizeDouble(High[k]+80*Point,4),4), 12, "Impact", clrBlue);
                     
                     ObjectCreate("Cinnabonn"+IntegerToString(j), OBJ_TEXT, indicator_window, Time[j], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(j), "R2MA", 12, "Impact", clrBlue);
         }    
         
          
   }
    if (MFI[i]>MFI[i+1] && MFI[i+1]>MFI[i+2] && MFI[i]<0 && MFI[i-1]<0 && MFI[i-1]<MFI[i] && i>0){
   
      if (i<56) ObjectCreate("Cinnamon"+IntegerToString(i), OBJ_RECTANGLE, 0,  Time[i+1], Low[i+1]-100*Point, Time[0], Low[i+1]-150*Point);
      else  ObjectCreate("Cinnamon"+IntegerToString(i), OBJ_RECTANGLE, 0,  Time[i+1], Low[i+1]-100*Point, Time[i-1], Low[i+1]-150*Point);
      if (Close[0]>Low[i+1]-50*Point) ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrLimeGreen);
      else if (Close[0]<Low[i+1]-200*Point) ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrTomato);
          else ObjectSetInteger(0,"Cinnamon"+IntegerToString(i),OBJPROP_COLOR,clrGoldenrod);
          ObjectSet("Cinnamon"+IntegerToString(i),OBJPROP_BACK,1);
          ObjectSet("Cinnamon"+IntegerToString(i),OBJPROP_WIDTH,1);
          
           if (Period()==1440 && i<56){
               ObjectCreate("CinnamonXY"+IntegerToString(i), OBJ_TEXT, 0, Time[0], Low[i+1]+250*Point); 
                     ObjectSetText("CinnamonXY"+IntegerToString(i), "          +-100!", 22, "Arial Black", clrMagenta);
               }
          
          
             j=i-1;
         while(j>0){
         if (Low[j]<Low[i-1] && Low[j]<Low[i+1]-125*Point && Low[j]>Low[i+1]-360*Point && High[j]>Low[i+1]-125*Point) break;
         j--;
        }
         if (j>0 && Period()==1440) {
                      ObjectCreate("Cinnabon"+IntegerToString(j), OBJ_TEXT, 0, Time[j+1], Low[j]-50*Point); 
                     ObjectSetText("Cinnabon"+IntegerToString(j), "SellStop:"+DoubleToStr(NormalizeDouble(Low[j]-80*Point,4),4), 12, "Impact", clrNavy);
                     
                     ObjectCreate("Cinnabonn"+IntegerToString(j), OBJ_TEXT, indicator_window, Time[j], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(j), "R2MA", 12, "Impact", clrBlue);
         }   
         
             k=j-1;
         while(k>0){
         if (Low[k]<Low[j]-50*Point && Low[k-1]>Low[k] && Low[k]>Low[j]-160*Point && High[k]>Low[j]) break;
         k--;
        }
         if (k>0 && Period()==1440) {
                      ObjectCreate("Cinnabon"+IntegerToString(k), OBJ_TEXT, 0, Time[k+1], Low[k]-150*Point); 
                     ObjectSetText("Cinnabon"+IntegerToString(k), "SellStop:"+DoubleToStr(NormalizeDouble(Low[k]-80*Point,4),4), 12, "Impact", clrBlue);
                     
                     ObjectCreate("Cinnabonn"+IntegerToString(j), OBJ_TEXT, indicator_window, Time[j], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(j), "R2MA", 12, "Impact", clrBlue);
         }   
         
   } 
   
   if (Period()==1440 && iStochastic(symbol,0,18,3,3,MODE_SMA,0,MODE_MAIN,i)<4.9 && iStochastic(symbol,0,18,3,3,MODE_SMA,0,MODE_MAIN,i+1)>4.9){
        ObjectCreate("Cinnaboner"+IntegerToString(i), OBJ_TEXT, indicator_window, Time[i], 50); 
                     ObjectSetText("Cinnaboner"+IntegerToString(i), "EVAL 4 DIVG / COLOR", 12, "Impact", clrPurple);
   }
   
   
}   


double breakup=1000;
double breakdown = 0;

/////REVERGENCEs up
for(i=lookback; i>=0; i--){
   if (iFractals(symbol,0,MODE_LOWER,i)){
      j=i+3;
     while (j<i+36){
         if (iFractals(symbol,0,MODE_LOWER,j) && Low[j]>Low[i] && MFI[j]<MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))) break;
      j++;   
     } 
     if (j<i+36 && iFractals(symbol,0,MODE_LOWER,j) && Low[j]>Low[i] && MFI[j]<MFI[i]){ 
         
        //   ObjectDelete("REVERGENCEs"+IntegerToString(j)); 
         //               ObjectCreate(0,"REVERGENCEs"+IntegerToString(j),OBJ_TREND,indicator_window,Time[j],MFI[j],Time[i],MFI[i]);
          //              ObjectSetInteger(0,"REVERGENCEs"+IntegerToString(j),OBJPROP_RAY_RIGHT,false);
          //              ObjectSet("REVERGENCEs"+IntegerToString(j),OBJPROP_COLOR,clrLimeGreen);
           //             ObjectSet("REVERGENCEs"+IntegerToString(j),OBJPROP_WIDTH,2); 
           //             ObjectSet("REVERGENCEs"+IntegerToString(j),OBJPROP_BACK,1);
                        
                      if (RSI2[i]<35){
                      
          ObjectCreate("Dittyyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
         ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_COLOR,clrYellow );
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_WIDTH,7);
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_BACK,1); 
                      
                          ObjectCreate("Dittyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
         ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_COLOR,clrLimeGreen );
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_WIDTH,3);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_BACK,1);  
           
           }
           
           breakdown = Low[i]-80*Point;
           if (Period()==1440){ breakdown = Low[i]-460*Point;
                  
                     ObjectCreate("Cinnabonn"+IntegerToString(i), OBJ_TEXT, indicator_window, Time[i], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(i), "R2MA", 12, "Impact", clrBlue);
                  }
                  
           deletetxt1("Davidson");
           
           ObjectCreate("Davidson", OBJ_TEXT, 0, Time[i], Low[i]+10*Point); 
     ObjectSetText("Davidson", CharToStr(120), 38, "Wingdings", clrOrange);
           
                        }
                 
      
   
   }  

}

/////continuation REVERGENCE up
for(i=lookback; i>=0; i--){
   if (iFractals(symbol,0,MODE_LOWER,i)){
      j=i+3;
     while (j<i+36){
         if (iFractals(symbol,0,MODE_LOWER,j) && Low[j]<Low[i] && MFI[j]>MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))         ) break;

      j++;   
     } 
     if (j<i+36 && iFractals(symbol,0,MODE_LOWER,j) && Low[j]<Low[i] && MFI[j]>MFI[i]){ 
        
           //  ObjectDelete("REVERGENCEr"+IntegerToString(j)); 
           //             ObjectCreate(0,"REVERGENCEr"+IntegerToString(j),OBJ_TREND,indicator_window,Time[j],MFI[j],Time[i],MFI[i]);
           //             ObjectSetInteger(0,"REVERGENCEr"+IntegerToString(j),OBJPROP_RAY_RIGHT,false);
           //             ObjectSet("REVERGENCEr"+IntegerToString(j),OBJPROP_COLOR,clrNavy);
           //             ObjectSet("REVERGENCEr"+IntegerToString(j),OBJPROP_WIDTH,2); 
           //             ObjectSet("REVERGENCEr"+IntegerToString(j),OBJPROP_BACK,1);
      
         if (RSI2[i]<15){
         
         
                          ObjectCreate("Dittyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
                                 ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_COLOR,clrLimeGreen );
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_WIDTH,3);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_BACK,1); 
            }
    }
   }  

}


//////REVERGENCE down
for(i=lookback; i>=0; i--){
   if (iFractals(symbol,0,MODE_UPPER,i)){
      j=i+3;
     while (j<i+36){
         if (iFractals(symbol,0,MODE_UPPER,j) && High[j]<High[i] && MFI[j]>MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))) break;
      j++;   
     } 
     if (j<i+36 && iFractals(symbol,0,MODE_UPPER,j) && High[j]<High[i] && MFI[j]>MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))){ 
         
         //    ObjectDelete("REVERGENCEZ"+IntegerToString(j)); 
         //               ObjectCreate(0,"REVERGENCEZ"+IntegerToString(j),OBJ_TREND,indicator_window,Time[j],MFI[j],Time[i],MFI[i]);
         //               ObjectSetInteger(0,"REVERGENCEZ"+IntegerToString(j),OBJPROP_RAY_RIGHT,false);
         //               ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_COLOR,clrPink);
         //               ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_WIDTH,2); 
         //               ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_BACK,1);
                        
                        
                        
          ObjectCreate("Dittyyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
         ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_COLOR,clrYellow );
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_WIDTH,7);
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyyy"+IntegerToString(i),OBJPROP_BACK,1); 
                        
                          ObjectCreate("Dittyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
         ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_COLOR,clrRed);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_WIDTH,3);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_BACK,1);
            
         breakup = High[i]+80*Point;
          if (Period()==1440){ breakup = High[i]+460*Point;
         
          ObjectCreate("Cinnabonn"+IntegerToString(i), OBJ_TEXT, indicator_window, Time[i], 98); 
                     ObjectSetText("Cinnabonn"+IntegerToString(i), "R2MA", 12, "Impact", clrBlue);}
         
                deletetxt1("Davidoff");
           
           ObjectCreate("Davidoff", OBJ_TEXT, 0, Time[i], High[i]+90*Point); 
     ObjectSetText("Davidoff", CharToStr(120), 38, "Wingdings", clrOrange);
      
      }
   
   }  

}

//////continuation REVERGENCE down
for(i=lookback; i>=0; i--){
   if (iFractals(symbol,0,MODE_UPPER,i)){
      j=i+3;
     while (j<i+36){
         if (iFractals(symbol,0,MODE_UPPER,j) && High[j]>High[i] && MFI[j]<MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))) break;
      j++;   
     } 
     if (j<i+36 && iFractals(symbol,0,MODE_UPPER,j) && High[j]>High[i] && MFI[j]<MFI[i] && !(High[i]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i) && Low[i]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i)) && !(High[i+1]>iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1) && Low[i+1]<iMA(symbol,0,44,0,MODE_EMA,PRICE_MEDIAN,i+1))){ 
         
          //   ObjectDelete("REVERGENCEZ"+IntegerToString(j)); 
          //              ObjectCreate(0,"REVERGENCEZ"+IntegerToString(j),OBJ_TREND,indicator_window,Time[j],MFI[j],Time[i],MFI[i]);
          //              ObjectSetInteger(0,"REVERGENCEZ"+IntegerToString(j),OBJPROP_RAY_RIGHT,false);
          //              ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_COLOR,clrYellow);
          //              ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_WIDTH,2); 
          //              ObjectSet("REVERGENCEZ"+IntegerToString(j),OBJPROP_BACK,1);
      
         if (RSI2[i]>75){
                          ObjectCreate("Dittyy"+IntegerToString(i),OBJ_VLINE,indicator_window, Time[i], 0);
         ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_COLOR,clrRed );
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_WIDTH,3);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_STYLE,STYLE_DOT);
           ObjectSet("Dittyy"+IntegerToString(i),OBJPROP_BACK,1);  }
      }
   
   }  

}


deletetxt1("LOPEZ");
if (plot_ellipses){
for(i=180; i>=0; i--){
   if (High[i]>breakdown && Low[i]<breakdown && Close[i]>breakup){
          ObjectCreate("LOPEZ"+IntegerToString(i), OBJ_ELLIPSE, 0, Time[i], High[i], Time[i+1], Low[i]);
        ObjectSetInteger(0,"LOPEZ"+IntegerToString(i),OBJPROP_COLOR,clrChartreuse);
        ObjectSetDouble(0,"LOPEZ"+IntegerToString(i),OBJPROP_SCALE,.05);
        ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_WIDTH,8);
         ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_BACK,0);
   }


   if (High[i]>breakdown && Low[i]<breakdown && Close[i]<breakup){
          ObjectCreate("LOPEZ"+IntegerToString(i), OBJ_ELLIPSE, 0, Time[i], High[i], Time[i+1], Low[i]);
        ObjectSetInteger(0,"LOPEZ"+IntegerToString(i),OBJPROP_COLOR,clrPink);
        ObjectSetDouble(0,"LOPEZ"+IntegerToString(i),OBJPROP_SCALE,.05);
        ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_WIDTH,8);
         ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_BACK,0);
   }
   
      if (High[i]>breakup && Low[i]<breakup && Close[i]>breakup){
          ObjectCreate("LOPEZ"+IntegerToString(i), OBJ_ELLIPSE, 0, Time[i], High[i], Time[i+1], Low[i]);
        ObjectSetInteger(0,"LOPEZ"+IntegerToString(i),OBJPROP_COLOR,clrChartreuse);
        ObjectSetDouble(0,"LOPEZ"+IntegerToString(i),OBJPROP_SCALE,.05);
        ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_WIDTH,8);
         ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_BACK,0);
   }
      if (High[i]>breakup && Low[i]<breakup && Close[i]<breakup){
          ObjectCreate("LOPEZ"+IntegerToString(i), OBJ_ELLIPSE, 0, Time[i], High[i], Time[i+1], Low[i]);
        ObjectSetInteger(0,"LOPEZ"+IntegerToString(i),OBJPROP_COLOR,clrPink);
        ObjectSetDouble(0,"LOPEZ"+IntegerToString(i),OBJPROP_SCALE,.05);
        ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_WIDTH,8);
         ObjectSet("LOPEZ"+IntegerToString(i),OBJPROP_BACK,0);
   }

}
}
deletetxt1("ENVELOPE");


 ObjectCreate("ENVELOPE"+6,OBJ_LABEL,indicator_window, 0,0);
  ObjectSet("ENVELOPE"+6,OBJPROP_CORNER,1);
    ObjectSet("ENVELOPE"+6,OBJPROP_XDISTANCE,0);
  ObjectSet("ENVELOPE"+6,OBJPROP_YDISTANCE,20);
  ObjectSet("ENVELOPE"+6,OBJPROP_COLOR,clrPurple); 
  ObjectSetText("ENVELOPE"+6,"M. UPPER>"+NormalizeDouble(breakup,4),9,"Arial Black");


ObjectCreate("ENVELOPE"+9,OBJ_LABEL,indicator_window, 0,0);
  ObjectSet("ENVELOPE"+9,OBJPROP_CORNER,3);
    ObjectSet("ENVELOPE"+9,OBJPROP_XDISTANCE,0);
  ObjectSet("ENVELOPE"+9,OBJPROP_YDISTANCE,20);
  ObjectSet("ENVELOPE"+9,OBJPROP_COLOR,clrPurple); 
  ObjectSetText("ENVELOPE"+9,"M. LOWER>"+NormalizeDouble(breakdown,4),9,"Arial Black");


ObjectCreate("ENVELOPE"+3,OBJ_LABEL,2, 0,0);
  ObjectSet("ENVELOPE"+3,OBJPROP_CORNER,3);
    ObjectSet("ENVELOPE"+3,OBJPROP_XDISTANCE,0);
  ObjectSet("ENVELOPE"+3,OBJPROP_YDISTANCE,20);
  ObjectSet("ENVELOPE"+3,OBJPROP_COLOR,clrYellow); 
  ObjectSetText("ENVELOPE"+3,"ENTRY @ MORATORIUM LINE",9,"Arial Black");



deletetxt1("HINE");

     ObjectCreate( "HINE", OBJ_HLINE, 0, Time[0], NormalizeDouble(breakup,4));
               ObjectSet("HINE", OBJPROP_COLOR, clrYellow );
               ObjectSet("HINE", OBJPROP_WIDTH, 3 );
               ObjectSet("HINE", OBJPROP_STYLE, 4 );

ObjectCreate( "HINED", OBJ_HLINE, 0, Time[0], NormalizeDouble(breakdown,4));
               ObjectSet("HINED", OBJPROP_COLOR, clrYellow );
               ObjectSet("HINED", OBJPROP_WIDTH, 3 );
               ObjectSet("HINED", OBJPROP_STYLE, 4 );



deletetxt1("Harley");

for(i=lookback; i>0; i--){

////Captain America
   if (Period()==60 && High[i]>High[i+1] && High[i]>High[i-1] && i>0 && High[i]-380*Point<iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,2,i+4)) && High[i]>iMA(symbol,60,207,0,MODE_EMA, PRICE_LOW,i) && High[i]-250*Point>iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,2,i+4))
  //&& RSI2[i]<84
   && (RSI2[i+4]<15 || RSI2[i+4]>16)
   && Close[i]<iMA(NULL,0,44,0,MODE_EMA, PRICE_MEDIAN,i)+490*Point && i>1 && High[i-2]<High[i]
   )
   {
     ObjectCreate("Harley"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], High[i]+100*Point); 
     ObjectSetText("Harley"+DoubleToStr(i), CharToStr(181), 68, "Wingdings", clrCrimson);
     ObjectSet("Harley"+DoubleToStr(i),OBJPROP_BACK,1);
   }

 if (Period()==60 && Low[i]<Low[i+1] && Low[i]<Low[i-1] && i>0 && Low[i]+380*Point>iLow(symbol,0,iLowest(symbol,0,MODE_LOW,2,i+4)) 
     //&& High[i]>iMA(symbol,60,207,0,MODE_EMA, PRICE_LOW,i) 
     && Low[i]+250*Point<iLow(symbol,0,iLowest(symbol,0,MODE_LOW,2,i+4)) && i>1 && Low[i-2]>Low[i])
   {
     ObjectCreate("Harleys"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], Low[i]+100*Point); 
     ObjectSetText("Harleys"+DoubleToStr(i), CharToStr(181), 68, "Wingdings", clrYellow);
     ObjectSet("Harleys"+DoubleToStr(i),OBJPROP_BACK,1);
   }   


   if (Period()==60 && Low[i]<Low[i+1] && Low[i]<Low[i-1] && i>0 && Low[i]+380*Point>iLow(symbol,0,iLowest(symbol,0,MODE_LOW,2,i+4)) && Low[i]<iMA(symbol,60,207,0,MODE_EMA, PRICE_HIGH,i) && Low[i]+250*Point<iLow(symbol,0,iLowest(symbol,0,MODE_LOW,2,i+4))
      && Close[i]>iMA(NULL,0,44,0,MODE_EMA, PRICE_MEDIAN,i)-490*Point && i>1 && Low[i-2]>Low[i]
   )
   {
     ObjectCreate("Harley"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], Low[i]+100*Point); 
     ObjectSetText("Harley"+DoubleToStr(i), CharToStr(181), 68, "Wingdings", clrDarkGreen);
     ObjectSet("Harley"+DoubleToStr(i),OBJPROP_BACK,1);
   }

      
   
   }

if (Period()==1440){   
ObjectCreate("CinnamonXYZ", OBJ_TEXT, 1, Time[0], 50); 
                     ObjectSetText("CinnamonXYZ", "                         10-16 Rejection", 15, "Arial Black", clrOrange);
ObjectCreate("CinnamonXY", OBJ_TEXT, 1, Time[0], 50); 
                     ObjectSetText("CinnamonXY", "                        10-16 Rejection", 15, "Arial Black", clrMagenta);

}


// WindowRedraw();
   return(0);
  }
//+------------------------------------------------------------------+
   void deletetxt1(string text){
   for(int iObj=ObjectsTotal()-1; iObj >= 0; iObj--){
      string   on = ObjectName(iObj);
      if(StringFind(on, text) == 0)  ObjectDelete(on);
}  }



Macdulio Classics: Fau Wee

An auto trendlines routine for higher time frames.

////Fau Wee by Macdulio
#property copyright   "2019, Macdulio"
#property link        "http://www.forexfore.blog"
#property description "Fau Wee"
#property strict

#property indicator_chart_window
#property indicator_minimum    0
#property indicator_maximum    100
#property indicator_buffers    3
#property indicator_color1     Yellow
#property indicator_level1 93
#property indicator_level2 85
#property indicator_level3 44
#property indicator_level4 15
#property indicator_level5 23
#property indicator_level6 7
#property indicator_level7 77
#property indicator_level8 56
#property indicator_levelcolor clrBlue
#property indicator_levelstyle STYLE_DOT
#property indicator_color1     clrNONE
extern int lookback = 400;
extern bool plot_RSI2_divergences = false;
extern bool plot_shadings = false;
extern bool plot_cls = false;
double UML[],DML[],UML240[],DML240[], Crack[], CrackUp[],CrackDn[];
double levels[];
string symbol = Symbol();
double RSI2[], RSI240[], stoch[], stoch2[], stoch60[];
bool boogieman[];
double shu[],shd[];
int dailydir[], dailycol[];
extern double FSize=32;
double FMax = FSize*6/5;
int OnInit(void)
  {
  
   SetIndexBuffer(0,Crack);
   SetIndexStyle(0,DRAW_LINE,2,8,Navy);
   
   SetIndexBuffer(1,CrackUp);
   SetIndexStyle(1,DRAW_LINE,2,6,LimeGreen);
   
   
   SetIndexBuffer(2,CrackDn);
   SetIndexStyle(2,DRAW_LINE,2,6,Pink);
 
  
  // SetIndexStyle(0,DRAW_LINE,EMPTY,5,Black);
  // SetIndexBuffer(0,RSI2);
   return(INIT_SUCCEEDED);
  }
  

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
  
ArrayResize(RSI2, Bars);   
ArrayInitialize(RSI2, 0); 
ArrayResize(RSI240, Bars);   
ArrayInitialize(RSI240, 0); 
ArrayResize(UML, Bars);   
ArrayInitialize(UML, EMPTY_VALUE); 
ArrayResize(DML, Bars);   
ArrayInitialize(DML, EMPTY_VALUE); 
ArrayResize(UML240, Bars);   
ArrayInitialize(UML240, EMPTY_VALUE); 
ArrayResize(DML240, Bars);   
ArrayInitialize(DML240, EMPTY_VALUE); 
ArrayResize(dailydir, Bars);
ArrayInitialize(dailydir, 0);
ArrayResize(dailycol, Bars);
ArrayInitialize(dailycol, 0);  
  ArrayResize(stoch, Bars);   
 ArrayInitialize(stoch, 0);   
  ArrayResize(stoch2, Bars);   
 ArrayInitialize(stoch2, 0);  
 ArrayResize(stoch60, Bars);   
 ArrayInitialize(stoch60, 0); 
 ArrayResize(shd, Bars);   
 ArrayInitialize(shd, EMPTY_VALUE); 
ArrayResize(shu, Bars);   
 ArrayInitialize(shu, EMPTY_VALUE); 
 ArrayResize(Crack, Bars);   
 ArrayInitialize(Crack, EMPTY_VALUE); 
  ArrayResize(CrackUp, Bars);   
 ArrayInitialize(CrackUp, EMPTY_VALUE); 
 ArrayResize(CrackDn, Bars);   
 ArrayInitialize(CrackDn, EMPTY_VALUE); 
ArrayResize(boogieman, Bars);   
 ArrayInitialize(boogieman, false); 
ArrayResize(levels, Bars);   
 ArrayInitialize(levels, EMPTY_VALUE); 

 
 
int    i,i2,j,j2,k;
datetime UpFractalTime_1,LowFractalTime_1,UpFractalTime_2,LowFractalTime_2;

for(i=lookback; i>=0; i--){
  RSI2[i]=iRSI(symbol,0,2,PRICE_MEDIAN,i);
  RSI240[i]=iRSI(symbol,240,2,PRICE_MEDIAN,i);
  stoch[i]=iStochastic(symbol,0,7,3,3,MODE_SMA,1,MODE_SIGNAL,i);
  stoch2[i]=iStochastic(symbol,0,13,3,3,MODE_SMA,1,MODE_SIGNAL,i);
  stoch60[i]=iStochastic(symbol,0,60,3,3,MODE_SMA,0,MODE_SIGNAL,i);
}


for (i = 330 ; i >= 1; i--) {     
   Crack[i]=Crack[i+1];
   CrackUp[i]=CrackUp[i+1];
   CrackDn[i]=CrackDn[i+1];
   
   if (RSI2[i]>RSI2[i-1]+2 && RSI2[i]>RSI2[i+1]+2 && RSI2[i]<99 && RSI2[i]>23) shu[i]=High[i];
   if (RSI2[i]<RSI2[i-1]-2 && RSI2[i]<RSI2[i+1]-2 && RSI2[i]>1 && RSI2[i]<56) shd[i]=Low[i];  
   if (stoch60[i+1]<55 && stoch60[i+2]<55 && stoch60[i+3]<55 && stoch60[i+4]<55 && stoch60[i+5]<55 && stoch60[i]>55) {CrackUp[i]=Crack[i]=(High[i]+Low[i])/2; CrackDn[i]=EMPTY_VALUE;}
   else if (stoch60[i+1]>45 && stoch60[i+2]>45 && stoch60[i+3]>45 && stoch60[i+4]>45 && stoch60[i+5]>45 && stoch60[i]<45) {CrackDn[i]=Crack[i]=(High[i]+Low[i])/2; CrackUp[i]=EMPTY_VALUE;}
   if (CrackDn[i]==EMPTY_VALUE && CrackDn[i+1]!=EMPTY_VALUE) Crack[i]=EMPTY_VALUE;
   if (CrackDn[i+1]==EMPTY_VALUE && CrackDn[i+2]!=EMPTY_VALUE) Crack[i]=CrackUp[i];
   
   if (CrackUp[i]==EMPTY_VALUE && CrackUp[i+1]!=EMPTY_VALUE) Crack[i]=EMPTY_VALUE;
   if (CrackUp[i+1]==EMPTY_VALUE && CrackUp[i+2]!=EMPTY_VALUE) Crack[i]=CrackDn[i];
   
}




deletetxt1("BALNA"); 
deletetxt1("ETEAL"); 


int ucount = 0;
int dcount = 0;

for (k = 1 ; k <= 120; k++) {     


if (dcount<104){
j2=k;
while (j2<200){
   if (shd[j2]!=EMPTY_VALUE) break;
   j2++;
}
j=j2+3; 
while (j<j2+11){
   if (shd[j]!=EMPTY_VALUE && shd[j]<shd[j2]) break;
   j++;
}  


if (j2<200 && j<j2+12 && dcount<24) {LowFractalTime_2=iTime(NULL, 0,j2);    LowFractalTime_1=iTime(NULL, 0,j);    


  ObjectDelete(0,"BALNA3_2"+DoubleToStr(k));
     ObjectCreate(0,"BALNA3_2"+DoubleToStr(k),OBJ_TREND,0,LowFractalTime_1,Low[j],LowFractalTime_2,Low[j2]);
    ObjectSetInteger(0,"BALNA3_2"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
         if (j<j2+11) ObjectSet("BALNA3_2"+DoubleToStr(k),OBJPROP_COLOR,clrCrimson);
         else ObjectSet("BALNA3_2"+DoubleToStr(k),OBJPROP_COLOR,indicator_color1);
         ObjectSet("BALNA3_2"+DoubleToStr(k),OBJPROP_BACK,1);
         ObjectSet("BALNA3_2"+DoubleToStr(k),OBJPROP_WIDTH,3);
         
   dcount++;
  // if (k<10){      
  //       ObjectCreate("ETEAL"+DoubleToStr(k), OBJ_RECTANGLE, 0, Time[j2], Low[j2]-FSize/2*10*Point, Time[1], Low[j2]);
  //       ObjectSetInteger(0,"ETEAL"+DoubleToStr(k),OBJPROP_COLOR,clrTeal);
  //       ObjectSet("ETEAL"+DoubleToStr(k),OBJPROP_WIDTH,8);}
 }    
}


if (ucount<84){
i2=k;
while (i2<200){
   if (shu[i2]!=EMPTY_VALUE) break;
   i2++;
}

i=i2+3; 
while (i<i2+12){
   if (shu[i]!=EMPTY_VALUE && shu[i]>shu[i2]) break;
   i++;
}  
   
if (i2<200 && i<i2+12 && ucount<24 ) { UpFractalTime_2=iTime(NULL, 0,i2);    UpFractalTime_1=iTime(NULL, 0,i); 

 ObjectDelete(0,"BALNA3_1"+DoubleToStr(k));
         ObjectCreate(0,"BALNA3_1"+DoubleToStr(k),OBJ_TREND,0,UpFractalTime_1,High[i],UpFractalTime_2,High[i2]);
         ObjectSetInteger(0,"BALNA3_1"+DoubleToStr(k),OBJPROP_RAY_RIGHT,true);
         if (i<i2+11) ObjectSet("BALNA3_1"+DoubleToStr(k),OBJPROP_COLOR,clrGreen);
         else  ObjectSet("BALNA3_1"+DoubleToStr(k),OBJPROP_COLOR,indicator_color1);
         ObjectSet("BALNA3_1"+DoubleToStr(k),OBJPROP_BACK,1);
         ObjectSet("BALNA3_1"+DoubleToStr(k),OBJPROP_WIDTH,3);
         ucount++;
  // if (k<10){         
   //      ObjectCreate("ETEAL"+DoubleToStr(k), OBJ_RECTANGLE, 0, Time[i2], High[i2]+FSize/2*10*Point, Time[1], High[i2]);
   //      ObjectSetInteger(0,"ETEAL"+DoubleToStr(k),OBJPROP_COLOR,clrTeal);
   //      ObjectSet("ETEAL"+DoubleToStr(k),OBJPROP_WIDTH,8);}
}
}
}


   return(rates_total);
  }
//+------------------------------------------------------------------+
   void deletetxt1(string text){
   for(int iObj=ObjectsTotal()-1; iObj >= 0; iObj--){
      string   on = ObjectName(iObj);
      if(StringFind(on, text) == 0)  ObjectDelete(on);
}  }

In combination w/ MFI and CounterFore52

Time Warp

They gave me 4 years, 3 more to go, keep chewing pretzels, time’s passing so slow.

Everyone is trying to guess the where of a continuation buy. Who cares about the when other than I?

What if I told you that the valley has the clock running at 2x speed?

Prevent horizon?

A snail has to be beauty and time conscious.

Inverse fair value gap SIBI mitigation? Nah.

Percentaggi? Ain’t that.

If you want your trading to become more of a smooth snailing, do the following:

Have a 30-min 30 sampl BB HL2 to spot the 3rd volatility breach (start of correction).

Have a 60-min chart with the Green River (E207 High & Low) and the Guard Rails plotted for 1 fluctuation maximum distance marker, be conscious of the time zone and start counting the hours.

Loneliness: 14-16 hours. 7 inside the valley

Disregard: 21-23 hours. 10-11 inside the valley.

Occult Populism

God forbid someone coming along and start telling you that trading was reactive.

I used to like this guy, but this video killed it for me. A painful joke from begining to end.

As you can see, there is no up, up and away from the bottom. There is a struggle to get higher. If there was a liquidity break, there could be a parabolic run up.

What are we waiting on? The water uo freeze over. It would do when the distance drops below 27 pips between the shores. This is a safety mechanism.

The fact that I have 0 followers has nothing to do with the fact that I do have the answers.

You have received 68 Bitcoins from a random address. What do you do?

  • Surrender yourself at the neatest police station.
  • Marry the neighbor’s dog.

The road is long, but the dope is strong.

End of M Leg

End of Measuring Leg last example:

There was a lower low made for a black Nick Rhodes print, a close up and a 160-pip rally before the Beat was made. In fact this round trip was made twice with the second rally (the volatility whip’s V leg) touching the upper BB.

Diffrerences. Currently the lower BB is still being capacitated.

The downside stoch room difference between the two low close pro volume candles is huge. I would suggest that the pros dumped most of their holdings, but not all. The 160-pip rally would mean 1.0845 for the rebound. The script may still be valid, as the BB will continue to get closer every day.

Push and Echo go hand in hand, so does Measuring Leg and Divergent Leg, but I use the first two mainly on the daily and above whilst the latter pair on 4H and below.

  ////////lower vertigenta
      if (((score[i]==0 && score[i+1]==-3 && (score[i+2]==-2 || score[i+2]==-1))  || (score[i]==0 && score[i+1]==-3 && score[i+2]==-3 && (score[i+3]==-2 || score[i+3]==-1)))
         && Low[i+1]<iMA(symbol,0,207,0,MODE_EMA,PRICE_HIGH,i+1)
      ){
   
      ObjectCreate("Panaceat"+DoubleToStr(i), OBJ_TEXT, indicator_window, Time[i+1], 10.4); 
      ObjectSetText("Panaceat"+DoubleToStr(i), "EOF M LEG", 12, "Impact", clrPurple);
      vertigenta[i]=1;

  ObjectCreate("Panaceax"+DoubleToStr(i), OBJ_TEXT, indicator_window+1, Time[i+6], 55); 
                      ObjectSetText("Panaceax"+DoubleToStr(i), "V>"+DoubleToStr(NormalizeDouble(Low[i+1],4)+1600*Point,4), 32, "Impact", clrPurple);
                      ObjectSet("Panaceax"+DoubleToStr(i), OBJPROP_BACK,1); 
                

Wave Absorption

Elliott, my no-good-for-nothing son! Sit up straight in my class.

For your Corrections exam you received a C. You even failed to name the 3 kinds of the corrections.

The loneliness correction likely occurs when the 30-sample hourly BBs are still expanding. The price only makes it to the other side of the S30 by the 14th, 16th hour. Example:

The disregard correction likely occurs when the 30-sample hourly BBs have stopped expanding and the correction reaches its peak at the 21st / 23rd hour, often breaching the upper band. The S30 often gets challenged before the 14th / 16th hour. Example:

The 3rd correction type is the Liquidity Break.

Image below: Loneliness or Disregard?

We use indicators because we don’t have X-ray vision. You cannot just eyeball a candle and determine that the hourly RSI2 was below 6, I start counting the hours of the correction here.

For Wave Structures, you got an F. The volatility whip is not part of the wave structure, thus no labelling required. Recent Vol Whips highlighted.

Wave absorption is an experimental field. Usually it is Wave 4 that gets absorbed throwing off the count. My suggestion is a 6-sample 3SD 4-hour BB to spot the breach during extreme compression of volatility.

Back to Ricky Gervais.

He is dancing with Seona tears in his eyes.

The Seona images are from brochures. My only criteria was that they were taken the same day, so this image did not qualify:

Nor did this:

These did.

These two below look exactly like my wife & kid. What a coincidence!

Viva La Republica

The above call was made when the 1st powder box printed on the downside.

I remembered a setup that was the mirror image of this, on the second run the red line proved to be final. Of course, in this case the continuation divergence got broken and they rounded up the short gains a little more. I would expect the 50% of this new powder box to hold. Call it 1.0687

The great thing about Forex trading is that you can get away with little time by the computer. Crossing borders, flying for days, sailing without internet, buggy riding does not have to stop you from bringing your average holiday or not. Daily $500 is $2500 per week.

$2,9555.60 / 4 days (=$738.9 avg.) meets the criteria.

Republican Dominic

Don’t worry, won’t hold you for long. My target for the Wave 5 is 1.0705 (red square bottom). After that a vol whip’s V leg back to the continuation high (1.0950)

So what is Dominic doing over here? I left on Monday with a last minute withdrawal.

Teaching turtles algae jumping. I have gotten good at Photoshopping feet.

My new movement is this: make it and then pretend you’re faking it.

What Is Missing

It is the core of my thinking.

The process of turning the direction back up requires 2 triangles.

The 14x 4 hrs count is there to find the “head”.

The uptrend requires the print of the 2nd triangle, the right shoulder / higher low.

Of course, there can be surprises beyond the 14 print, but the red zone of the powder box should set a limit to this.

Since the higher low would be a correction, it would have to poke below the Lower Guard rail, which is the 4 hour E-52 minus a fluctuation maxiumum (38.4 pips – in orange). The first dotted line represents “deep correction” which is an additional 60 pips out.

This is my explanation as to why I am currently fully hedged despite the blue trendline has been broken to the upside.

There should be a higher low print – or a push back on the head.

There is one more thing. The 3 resistance prints (red laser beams) in close proximity would suggest a deeper pullback / continuation down.

Earlier example – same zone, same squeeze.

The plots

 ////R2 sequences
   
  if (i<400){
   if (i>0 && RSI2[i-1]<RSI2[i] && RSI2[i]>80 && RSI2[i+1]<RSI2[i] && RSI2[i+2]<RSI2[i+1] && High[i]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i) && (Close[i]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i) || Close[i-1]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i-1) ) ){
      ObjectCreate("Nickergence"+i,OBJ_TREND,0,Time[i],High[i],Time[i],High[i]+640*Point);
                 ObjectSetInteger(0,"Nickergence"+i,OBJPROP_RAY_RIGHT,false);
                 ObjectSet("Nickergence"+i,OBJPROP_COLOR,clrRed);
                 ObjectSet("Nickergence"+i,OBJPROP_WIDTH,9); 
                 ObjectSet("Nickergence"+i,OBJPROP_BACK,1);   
                 
                 
                    ObjectCreate("Bingvv"+IntegerToString(i), OBJ_TEXT, 0, Time[i+3], Close[i]+50*Point); 
       ObjectSetText("Bingvv"+IntegerToString(i), " RESI "+DoubleToStr(NormalizeDouble(Close[i],4),4), 16, "Impact", White); 

       ObjectCreate("Bingv"+IntegerToString(i), OBJ_TEXT, 0, Time[i+3], Close[i]+50*Point); 
       ObjectSetText("Bingv"+IntegerToString(i), "RESI "+DoubleToStr(NormalizeDouble(Close[i],4),4), 16, "Impact", Red); 
                 
                 
   }

B36 9CNT

Yes, this is going to be a CNT. Much too technical.

I guess I have not really shown you examples of the 100-pip stepping blocks at swing turns.

This was meant to be the lead up to the first answer about why use a 100-pip (1000 points) displacement for the bumper lines.

   if (High[i+20]>iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,200,i+21))) upperbumper[i]=High[i+20]+1000*Point;
    if (Low[i+20]<iLow(symbol,0,iLowest(symbol,0,MODE_LOW,200,i+21))) lowerbumper[i]=Low[i+20]-1000*Point;


We are talking the protruding green and orange lines. Some help with the limitations. 

By the way, the market has already gone into escrow, doing its 14×4 hrs count.

The powder boxes could print without touching these lines, but overall, price will not go without noticing it by at least a touch & divergence or a near miss.

Example below for the touch & cca 100 pips miss-divergnece.

Now a quick supplementary info on the E-50 band on the daily. It is actually a 20-sample E44 smoothing and the other two bands are 10-sample 1 std displacements.

Pretty sure I’ve posted the code before.

#property copyright   "Bands by Macdulio, (c) 2021"
#property link        "http://www.forexfore.blog"
#property description "Bands by Macdulio"
#property description "You don't defy the first day"
#property description "Passing through God."

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 LightSeaGreen
#property indicator_color2 LightSeaGreen
#property indicator_color3 LightSeaGreen

extern int lookback = 1000;
double ExtMovingBuffer[];
double ExtUpperBuffer[];
double ExtLowerBuffer[];
double E44[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   IndicatorBuffers(3);
  // IndicatorDigits(Digits);
//--- middle line
   SetIndexStyle(0,DRAW_LINE,0,3,indicator_color1);
   SetIndexBuffer(0,ExtMovingBuffer);
   SetIndexLabel(0,"Bands SMA");
//--- upper band
   SetIndexStyle(1,DRAW_LINE,0,3,indicator_color2);
   SetIndexBuffer(1,ExtUpperBuffer);
   SetIndexLabel(1,"Bands Upper");
//--- lower band
   SetIndexStyle(2,DRAW_LINE,0,3,indicator_color3);
   SetIndexBuffer(2,ExtLowerBuffer);
   SetIndexLabel(2,"Bands Lower");

   return(0);
  }
//+------------------------------------------------------------------+
//| Bollinger Bands                                                  |
//+------------------------------------------------------------------+
int start()
{
  ArrayResize(E44, Bars);
  ArrayInitialize(E44,EMPTY_VALUE);  
  ArrayResize(ExtMovingBuffer, Bars);
  ArrayInitialize(ExtMovingBuffer,0); 
   ArrayResize(ExtUpperBuffer, Bars);
  ArrayInitialize(ExtUpperBuffer,0); 
     ArrayResize(ExtLowerBuffer, Bars);
  ArrayInitialize(ExtLowerBuffer,0); 

   int i,j;
   string symbol = Symbol();
double std;

   
for (i=lookback; i>=0; i--){        E44[i]=iMA(symbol,0,44,0,MODE_EMA, PRICE_MEDIAN,i);

}


 
for (i=0; i<lookback; i++){  
      for (j=i; j<i+20; j++) 
      ExtMovingBuffer[i]=ExtMovingBuffer[i]+E44[j];
       ExtMovingBuffer[i]=ExtMovingBuffer[i]/20;

}      

deletetxt1("God");
 
   for (i=lookback-1; i>=0; i--)
   {  
 
      std = iStdDevOnArray(ExtMovingBuffer,0,10,0,0,i);                 

 
   if (High[i]>ExtMovingBuffer[i]+100*Point && Low[i]<ExtMovingBuffer[i]-100*Point && !(High[i+1]>ExtMovingBuffer[i+1] && Low[i+1]<ExtMovingBuffer[i+1]))
          ObjectCreate("God"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], ExtMovingBuffer[i]+130*Point); 
          ObjectSetText("God"+DoubleToStr(i), "GOD DAY 1", 14, "Impact",  Maroon); 
      
   }  

   return(0);
  }

   void deletetxt1(string text){
   for(int iObj=ObjectsTotal()-1; iObj >= 0; iObj--){
      string   on = ObjectName(iObj);
      if(StringFind(on, text) == 0)  ObjectDelete(on);
}  }

Now, down to the subject of the B-s.

B36 9cnt aka B sensitivo

The sensitive B is an RSI2 divergence that occurs within the hourly 30-sample BB HL2.

Two examples below.

The way it behaves is the following: a 9-hour counter starts ticking. If price comes back within that time to retest the low, the divergence is “confirmed in”. The back test should not exceed the divergent low by more than a handful of pips.

The one on the left shows when price is taking longer than 9 hours to return, it gives way and there would be a lower low made about 36 pips out.

Two more earlier examples for this step down function. Wait a couple of pips to get in, you’ll still have 36 or so to cash in.

 ///RSI2 divergence dn
 
 if (i>0 && RSI2[i]<RSI2[i+1] && RSI2[i-1]>RSI2[i] && RSI2[i]>3 && RSI2[i]<12 && iRSI(symbol,0,14,PRICE_MEDIAN,i)<30 && Low[i]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_MAIN,i)
 && RSI2[ArrayMinimum(RSI2,19,i+1)]<RSI2[i]
 ){
      ObjectCreate("Talm"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], Low[i]- 50*Point); 
            if (Low[i]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i)) ObjectSetText("Talm"+DoubleToStr(i), "B36 9cnt", 42, "Impact", DeepPink);
            else ObjectSetText("Talm"+DoubleToStr(i), "B", 42, "Impact", DarkGreen);
            if (b[i+3]==true || b[i+4]==true || b[i+5]==true || b[i+6]==true || b[i+7]==true || b[i+8]==true || b[i+9]==true || b[i+10]==true || b[i+11]==true || b[i+12]==true){
            ObjectSetText("Talm"+DoubleToStr(i), "B2", 42, "Impact", DarkGreen);
            if (b[i+8]==true || b[i+9]==true || b[i+10]==true || b[i+11]==true || b[i+12]==true)
            ObjectSetText("Talm"+DoubleToStr(i), "B10", 42, "Impact", DarkGreen);
            else {
               ObjectCreate("Talmi"+DoubleToStr(i), OBJ_TEXT, 0, Time[i], Low[i]+ 650*Point); 
               ObjectSetText("Talmi"+DoubleToStr(i), "Sell"+DoubleToStr(NormalizeDouble(Low[i]+600*Point,4),4)+" 4 liq brk", 22, "Impact", Blue);
            }}
            b[i]=true;
 }

No, I did not have this plot on Friday yet, but I was certain I wanted to cut all the shorts as close as possible it was to the low made earlier, so I kept closing them by 10 more micro lots every lower / closer print.

I’ll be in the Caribbean till the 6th, so no articles for a while.