Market Sports – Soccer

A consolidation range (aka soccer field) is defined by divergences that outline the perimeter.

When liquidity is low and a consolidation is needed, you should be expecting a consolidation and the soccer play to be contained.

On the last day of the year it isn’t a surprise that most players choose bench warming.

The two RSI divergences on the image above are the magenta dashes and the white “#1” prints point out that these are premium signals. You can also see what happened after they pushed the ball (price) behind the goal line (both on the up and the down side).

To find the last two RSI2 divergences, here is what you do:

  j2=1;
   while (j2<500 ){
    j=j2+3; 
      if (ExtDownFractalsBuffer[j2]==EMPTY_VALUE  && !((RSI2[j2]<RSI2[j2+1] && RSI2[j2]<RSI2[j2-1] )  ||  (RSI2[j2+1]<RSI2[j2] && RSI2[j2+1]<RSI2[j2+2] ))) 
         while (j<j2+11){
               if (iFractals(Symbol(),0,MODE_LOWER,j)
               && ((RSI2[j]<RSI2[j+1] && RSI2[j]<RSI2[j-1])  ||  (RSI2[j+1]<RSI2[j] && RSI2[j+1]<RSI2[j+2] ))
               && ((RSI2[j2]>RSI2[j] && Low[j2]<Low[j])  || (RSI2[j2]>RSI2[j+1] && Low[j2]<Low[j+1])) 
               
               ) break;
         j++;}
    if (iFractals(Symbol(),0,MODE_LOWER,j) && iFractals(Symbol(),0,MODE_LOWER,j2) && (
      (RSI2[j2]>RSI2[j] && Low[j2]<Low[j])   
    
    )) break;
        
          j2++;}  


if (j2<500 && ExtDownFractalsBuffer[j]!=EMPTY_VALUE && ExtDownFractalsBuffer[j2]!=EMPTY_VALUE  ) {LowFractalTime_2=iTime(NULL, 0,j2);    LowFractalTime_1=iTime(NULL, 0,j);    }


 if (j<500 && j<j2+11)   { 
         ObjectCreate("TEAL"+DoubleToStr(j), OBJ_RECTANGLE, 0, Time[j2], Low[j2]-FSize/2*10*Point, Time[1], Low[j2]);
         ObjectSetInteger(0,"TEAL"+DoubleToStr(j),OBJPROP_COLOR,clrTeal);
         ObjectSet("TEAL"+DoubleToStr(j),OBJPROP_WIDTH,8);                   }
   
      

 i2=1;
   while (i2<500){
      i=i2+3;
      if (ExtUpFractalsBuffer[i2]==EMPTY_VALUE && ((RSI2[i2]>RSI2[i2+1] && RSI2[i2]>RSI2[i2-1] )  ||  (RSI2[i2+1]>RSI2[i2] && RSI2[i2+1]>RSI2[i2+2] )))     
      //iFractals(Symbol(),0,MODE_UPPER,i2)
      while (i<i2+11 ){
            if (iFractals(Symbol(),0,MODE_UPPER,i)
             &&  ((RSI2[i]>RSI2[i+1] && RSI2[i]>RSI2[i-1])  ||  (RSI2[i+1]>RSI2[i] && RSI2[i+1]>RSI2[i+2] ))
            && ((RSI2[i2]<RSI2[i] && High[i2]>High[i])  || (RSI2[i2]<RSI2[i+1] && High[i2]>High[i+1])) 
            
            ) break;
         i++;}
      if (ExtUpFractalsBuffer[i]!=EMPTY_VALUE  && iFractals(Symbol(),0,MODE_UPPER,i2) && (
                 (RSI2[i2]<RSI2[i] && High[i2]>High[i])   
            ) ) break;
               i2++;}  


if (ExtUpFractalsBuffer[i] && ExtUpFractalsBuffer[i2] &&  i2<500 ) { UpFractalTime_2=iTime(NULL, 0,i2);    UpFractalTime_1=iTime(NULL, 0,i);   }
 
 
if (i<500 && i<i2+11) { 
         ObjectCreate("TEAL"+DoubleToStr(i), OBJ_RECTANGLE, 0, Time[i2], High[i2]+FSize/2*10*Point, Time[1], High[i2]);
         ObjectSetInteger(0,"TEAL"+DoubleToStr(i),OBJPROP_COLOR,clrTeal);
         ObjectSet("TEAL"+DoubleToStr(i),OBJPROP_WIDTH,8);    

Either you insert the above code into your algorithm, or you can purchase an _RSI2_ for a very low cost to do the high light for you.

The #1 signal, that prompts a mean reversion is found / plotted by the 88 Luftballons routine, and for the first time, I share here the Sync classifier part.

string printsup(int i){
   string text=EMPTY_VALUE;
   if (sup[i+1]==0  && sup[i+2]==0  && sup[i+3]==0  && sup[i+4]==0  && sup[i+5]==0 && sup[i+6]==0 && sup[i+7]==0 && sup[i+8]==0 && sup[i+9]==0  &&  sup[i+10]==0  &&  sup[i+11]==0 
      && sup[i+11]==0  && sup[i+12]==0  && sup[i+13]==0  && sup[i+14]==0  && sup[i+15]==0 && sup[i+16]==0 
      && ((count5ups(i-1)==5  ) ||  (count5ups(i)==4 && RSI2[i+1]>95 && RSI2[i-1]<50 ))
   ) text ="S #1";
    
    else if (sup[i+3]==0  && sup[i+4]==0  && sup[i+5]==0 && sup[i+6]==0 && sup[i+7]==0 && sup[i+8]==0 && sup[i+9]==0  &&  sup[i+10]==0  &&  sup[i+11]==0 &&  sup[i+12]==0 &&  sup[i+13]==0 &&  sup[i+14]==0  &&  sup[i+15]==0 &&  sup[i+16]==0) text = "S1";
    else text = "S2";   
   if (text!=EMPTY_VALUE) return(text); 
   else return("");
}

string printsdn(int i){
   string text=EMPTY_VALUE;
    if (sdn[i+1]==0  && sdn[i+2]==0  && sdn[i+3]==0  && sdn[i+4]==0  && sdn[i+5]==0 && sdn[i+6]==0 && sdn[i+7]==0 && sdn[i+8]==0 && sdn[i+9]==0  &&  sdn[i+10]==0  &&  sdn[i+11]==0 
      && sdn[i+11]==0  && sdn[i+12]==0  && sdn[i+13]==0  && sdn[i+14]==0  && sdn[i+15]==0 && sdn[i+16]==0 && sdn[i+17]==0 && sdn[i+18]==0 && sdn[i+19]==0  &&  sdn[i+20]==0  &&  sdn[i+21]==0
      && count5dns(i-1)==5
      && (RSI2[i+1]<5 && RSI2[i+2]<5 && RSI2[i+3]<5 )
   ) text ="X";
   
   else if (sdn[i+1]==0  && sdn[i+2]==0  && sdn[i+3]==0  && sdn[i+4]==0  && sdn[i+5]==0 && sdn[i+6]==0 && sdn[i+7]==0 && sdn[i+8]==0 && sdn[i+9]==0  &&  sdn[i+10]==0  &&  sdn[i+11]==0 
      && sdn[i+11]==0  && sdn[i+12]==0  && sdn[i+13]==0  && sdn[i+14]==0  && sdn[i+15]==0 && sdn[i+16]==0 && sdn[i+17]==0
     && (printsup(i+1)=="S #1"  || printsup(i+2)=="S #1"  || printsup(i+3)=="S #1" || printsup(i+4)=="S #1" || printsup(i+5)=="S #1"  )
    && Close[i]<iMA(symbol,0,414,0,MODE_EMA, PRICE_LOW,i)-FMax*10*Point
   ) text ="S #1";
   
   
   
   else if (sdn[i+1]==0  && sdn[i+2]==0  && sdn[i+3]==0  && sdn[i+4]==0  && sdn[i+5]==0 && sdn[i+6]==0 && sdn[i+7]==0 && sdn[i+8]==0 && sdn[i+9]==0  &&  sdn[i+10]==0  &&  sdn[i+11]==0 
      && sdn[i+11]==0  && sdn[i+12]==0  && sdn[i+13]==0  && sdn[i+14]==0  && sdn[i+15]==0 && sdn[i+16]==0 && sdn[i+17]==0 && sdn[i+18]==0 && sdn[i+19]==0  &&  sdn[i+20]==0  &&  sdn[i+21]==0
      && count5dns(i-1)==5
      && Close[i]<iMA(symbol,0,414,0,MODE_EMA, PRICE_LOW,i)-FMax*10*Point
   ) text ="S #1";
    
    else if (sdn[i+3]==0  && sdn[i+4]==0  && sdn[i+5]==0 && sdn[i+6]==0 && sdn[i+7]==0 && sdn[i+8]==0 && sdn[i+9]==0  &&  sdn[i+10]==0  &&  sdn[i+11]==0 &&  sdn[i+12]==0  &&  sdn[i+13]==0 &&  sdn[i+14]==0  &&  sdn[i+15]==0 ) text = "S1";
    else text = "S2";   
     if (text!=EMPTY_VALUE) return(text); 
   else return("");
}