Too Far

Actualities first, then a general lesson with working code.

The main thing that I made progress on is adjusting the filters on the R15 RUN / DOOM.

The R15 (spike below RSI2-15 read) has filters for

“finding a root just prior” RSI2[ArrayMinimum(RSI2,16,i+1)]<4.4

“new 32-sample low in the last 16 sample” iLow(symbol,0,iLowest(symbol,0,MODE_LOW,32,i))== iLow(symbol,0,iLowest(symbol,0,MODE_LOW,16,i))

“lower high” iHighest(symbol,0,MODE_HIGH,16,i)>i+6

“no strong buying in the last 12 candles” RSI2[ArrayMaximum(RSI2,5,i+7)]<92

the “//” markers are defeated filters, no longer being used

I marked up the entry and the exit with orange ovals.


      
     ///RSI2 spike below 15
     if (RSI2[i+1]>RSI2[i+2] 
     && RSI2[i+3]>RSI2[i+2] 
     && RSI2[i+2]<15 
     && RSI2[i+2]>5.4 
     && RSI2[i+1]>15 
     && RSI2[i+3]>15 
    // && RSI2[i+3]<85 
   ///  && RSI2[i+4]>RSI2[i+3]
     && RSI2[ArrayMinimum(RSI2,16,i+1)]<4.4
    // && iHighest(symbol,0,MODE_HIGH,16,i)>i+6
   && RSI2[ArrayMaximum(RSI2,5,i+7)]<92
   && iLow(symbol,0,iLowest(symbol,0,MODE_LOW,32,i))== iLow(symbol,0,iLowest(symbol,0,MODE_LOW,16,i))
 //  && voldn[ArrayMaximum(voldn,36,i)]>30
     )
     
     { 
          ObjectCreate("Darchelle"+DoubleToStr(i), OBJ_TEXT, 1, Time[i+2], 76);
             ObjectSetText("Darchelle"+DoubleToStr(i), CharToStr(221), 97, "Wingdings", clrMediumSpringGreen);
             ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],90);
            ObjectSetText("SOGZ"+IntegerToString(i),"R15 RUN", 26, "Impact", clrBlue);
           
            
            
              ObjectCreate("SOGY"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],20);
            ObjectSetText("SOGY"+IntegerToString(i),"BWB->2xMag-D", 26, "Impact", clrBlue);
             
             if (Low[ArrayMinimum(RSI2,16,i+1)]>Low[i+2]) {ObjectSetText("Darchelle"+DoubleToStr(i), CharToStr(241), 62, "Wingdings", clrGray);  
             ObjectDelete("SOGY"+IntegerToString(i));
              
              if (RSI2[ArrayMinimum(RSI2,12,i+2)]>6)  ObjectSetText("SOGZ"+IntegerToString(i),"E44 retrace", 26, "Impact", clrBlue);
             else dir[i]=1;
             }
            else dir[i]=1;
            if (voldn[ArrayMaximum(voldn,20,i)]<20 && volup[ArrayMaximum(volup,20,i)]<20){
               ObjectSetText("SOGZ"+IntegerToString(i),"R15 DOOM", 26, "Impact", clrCrimson);
               ObjectSetText("Darchelle"+DoubleToStr(i), CharToStr(242), 62, "Wingdings", clrGray);  
               dir[i]=-1;
             
          }  
      }       
      

Of course, the retracement would not yield a lot of pips, but that’s an exception.

Usually you get a rip for 2 blood diamonds (numbered)

This R15 signal is here to show that with a lot of time provided, I can find anything that can superboost trading.

The following image has an R15 Doom before the R15 RUN.

So in actuality, we have seen the 2 blood diamonds, albeit back to back; I would not be looking for more upside (an 18-hour-long bowback to the swing high that confirms the V top with a shortfall is still possible).


Let’s introduce a new expression, “the market went too far”.

The checklist goes like this:

– V bottom.A greater than 32 print on the Market Type, with the next bar being at least 8 pips shorter.

– R15 run (quick spike below RSI2 15 then a squirt collection for 2 blood diamonds)

– Double divergence with enough momentum loss and a beat – measured by the Market Type indicator; the second divergence’s bar has to fall short of 17 pips.

– Six non-consecutive RSI2 diamonds (not one joint group) plus a beat.

So yeah, half of your questions can be answered by a Market Type Divergences routine.

#property copyright "Copyright © 2026, Macdulio"
#property link "https://forexfore.blog"
#property description "V1.0"
#property description "Market Type Divergences Only"
//#property strict
//--- indicator settings
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 clrRed
#property indicator_color2 clrGreen
#property indicator_level1 20
#property indicator_level2 30
#property indicator_levelcolor clrBlue
#property indicator_levelstyle STYLE_DOT
extern double valuetomonitor = 5.5;
extern int lookback = 100;
extern int indicator_window = 2;
extern int sample = 200;
extern double FSize=32;
double upper[], middle[], lower[];
double volup[], voldn[];
int tup[], tdn[], R6H[],R6L[];
double avg;
double FMax = FSize*6/5;
double iHi4[];
double iLo4[];
int mes[], dir[];
string symbol = Symbol();
double ExtATRBuffer[],ExtATRBuffer2[],ExtATRBuffer3[],ExtATRBuffer4[],ExtATRBuffer5[],stoch60[];
double corr[],corr2[], RSI2[], squeeze[], fifty[];
double frdn[],frup[];
int init(){
SetIndexBuffer(0,voldn);
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,6,indicator_color1);
SetIndexBuffer(1,volup);
SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,4,indicator_color2);
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(dir, Bars);
ArrayInitialize(dir, 0);
ArrayResize(R6H, Bars);
ArrayInitialize(R6H, 0);
ArrayResize(R6L, Bars);
ArrayInitialize(R6L, 0);
ArrayResize(corr, Bars);
ArrayInitialize(corr, EMPTY_VALUE);
ArrayResize(corr2, Bars);
ArrayInitialize(corr2, EMPTY_VALUE);
ArrayResize(middle, Bars);
ArrayInitialize(middle, EMPTY_VALUE);
ArrayResize(mes, Bars);
ArrayInitialize(mes, 0);
ArrayResize(squeeze, Bars);
ArrayInitialize(squeeze, 0);
ArrayResize(tup, Bars);
ArrayInitialize(tup, 0);
ArrayResize(tdn, Bars);
ArrayInitialize(tdn, 0);
ArrayResize(upper, Bars);
ArrayInitialize(upper, EMPTY_VALUE);
ArrayResize(lower, Bars);
ArrayInitialize(lower, EMPTY_VALUE);
ArrayResize(volup, Bars);
ArrayInitialize(volup, EMPTY_VALUE);
ArrayResize(fifty, Bars);
ArrayInitialize(fifty, EMPTY_VALUE);
ArrayResize(frup, Bars);
ArrayInitialize(frup, EMPTY_VALUE);
ArrayResize(frdn, Bars);
ArrayInitialize(frdn, EMPTY_VALUE);
ArrayResize(voldn, Bars);
ArrayInitialize(voldn, EMPTY_VALUE);
int i;
int RL=0;
int RH=0;
deletetxt1("Darchelle");
for(i=lookback; 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);
if (RSI2[i]>93.6) R6H[i]=1;
if (RSI2[i]<6.4) R6L[i]=1;
fifty[i]=(iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,399,i))+iLow(symbol,0,iLowest(symbol,0,MODE_LOW,399,i)))/2;
if (iFractals(symbol,30,MODE_UPPER,i)) frup[i]=High[i];
else frup[i]=frup[i+1];
if (iFractals(symbol,30,MODE_LOWER,i)) frdn[i]=Low[i];
else frdn[i]=frdn[i+1];
volup[i]=NormalizeDouble(MathAbs((Close[i]-iLow(symbol,0,iLowest(symbol,0,MODE_LOW,5,i)))*10000),0);
voldn[i]=NormalizeDouble(MathAbs((iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,5,i))-Close[i])*10000),0);
}
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;
ExtATRBuffer[i]= -1*(iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,sample*2-1,i+1))-Low[i])*-10000;
ExtATRBuffer2[i]=(High[i]-iLow(symbol,0,iLowest(symbol,0,MODE_LOW,sample*2-1,i+1)))*10000;
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(RSI2[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;
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>85 || twodigits<15) ObjectSetText("AverD",jointstring,40,"Wingdings",Yellow);
if (twodigits>=94 || twodigits<=6) ObjectSetText("AverD",jointstring,40,"Wingdings",DeepPink);
deletetxt1("Pitus");
deletetxt1("Rocket");
deletetxt1("Banalis");
deletetxt1("Pitus");
deletetxt1("Crush");
deletetxt1("Leap");
deletetxt1("Frog");
deletetxt1("Countess");
deletetxt1("Missing");
deletetxt1("KAROLY");
deletetxt1("SOG");
deletetxt1("Nix");
deletetxt1("Fraca");
int counter = 9;
for(i=lookback; i>=0; i--){
dir[i]=dir[i+1];
////diamond bleed up
if (RSI2[i]>93.6){
ObjectCreate("Darchellen"+DoubleToStr(i), OBJ_TEXT, 1, Time[i], 86);
ObjectSetText("Darchellen"+DoubleToStr(i), CharToStr(117), 21, "Wingdings", clrDimGray);
if (RSI2[i]>98) {ObjectSetText("Darchellen"+DoubleToStr(i), CharToStr(117), 21, "Wingdings", clrMagenta);
if (RH>3 && volup[i+1]>16) { if (volup[i+1]>29)
ObjectCreate("PitussY"+IntegerToString(i),OBJ_TREND,1, Time[i], 50, Time[i], 100);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_COLOR, clrPink);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_WIDTH, 10);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_BACK, 1 );
if (dir[i+1]<0) ObjectSet("PitussY"+IntegerToString(i), OBJPROP_COLOR, clrPurple);
}
if (volup[ArrayMaximum(volup,10,i+2)]>volup[i+1]) dir[i]=0;
}
}
////diamond bleed down
if (RSI2[i]<6.4){
ObjectCreate("Darchellen"+DoubleToStr(i), OBJ_TEXT, 1, Time[i], 26);
ObjectSetText("Darchellen"+DoubleToStr(i), CharToStr(117), 21, "Wingdings", clrDimGray);
if (RSI2[i]<2) {ObjectSetText("Darchellen"+DoubleToStr(i), CharToStr(117), 21, "Wingdings", clrMagenta);
if (RL>3 && voldn[i+1]>27) { if (voldn[i+1]>30 && i>0 && RSI2[i-1]>2) {dir[i]=1;
ObjectCreate("PitussY"+IntegerToString(i),OBJ_TREND,1, Time[i], 50, Time[i], 0);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_COLOR, clrMagenta);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_WIDTH, 18);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_BACK, 1 );}
}
}
}
/////V bottom
if (i>0 && voldn[i]<=voldn[i+1] &&
voldn[i+2]<voldn[i+1] &&
voldn[i+1]>34
&& (Close[i-1]>iLow(symbol,0,iLowest(symbol,0,MODE_LOW,5,i))+200*Point || voldn[i+1]>=voldn[i])
//&& Close[i]>Close[i+1]-50*Point && Close[i-1]>High[i]
&& voldn[ArrayMaximum(voldn,20,i)]==voldn[i+1]
&& Low[i+1]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+1)
&& Close[i-1]>=Low[i]
){
ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],80);
ObjectSetText("SOGZ"+IntegerToString(i),"V-Bottom", 36, "Impact", clrBlue);
}
/////V top
if (i>0 && volup[i-1]<volup[i] && volup[i]<=volup[i+1] &&
volup[i+2]<volup[i+1] &&
volup[i+1]>34 && ((Close[i]<Close[i+1]-50*Point && Close[i-1]<Low[i]) || Close[i]<High[i]-140*Point) &&
volup[ArrayMaximum(volup,20,i)]==volup[i+1]
&& High[i-1]>iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,5,i-1))-180*Point
&& voldn[i-1]<26
&& voldn[i-1]>15
){
ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],60);
ObjectSetText("SOGZ"+IntegerToString(i),"V/T->3xST", 36, "Impact", clrBlue);
}
///RSI2 spike below 15
if (RSI2[i+1]>RSI2[i+2] && RSI2[i+3]>RSI2[i+2] && RSI2[i+2]<15 && RSI2[i+2]>6.4 && RSI2[i+1]>15 && RSI2[i+3]>15 && RSI2[i+3]<85 && RSI2[i+4]>RSI2[i+3]
&& RSI2[ArrayMinimum(RSI2,16,i+1)]<6.4
// && iHighest(symbol,0,MODE_HIGH,16,i)>i+6
&& RSI2[ArrayMaximum(RSI2,5,i+7)]<90
&& iLow(symbol,0,iLowest(symbol,0,MODE_LOW,48,i))== iLow(symbol,0,iLowest(symbol,0,MODE_LOW,16,i))
// && voldn[ArrayMaximum(voldn,36,i)]>30
)
{
ObjectCreate("Darchelle"+DoubleToStr(i), OBJ_TEXT, 1, Time[i+2], 76);
ObjectSetText("Darchelle"+DoubleToStr(i), CharToStr(221), 97, "Wingdings", clrMediumSpringGreen);
ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],90);
ObjectSetText("SOGZ"+IntegerToString(i),"R15 RUN", 26, "Impact", clrBlue);
if (Low[ArrayMinimum(RSI2,16,i+1)]>Low[i+2]) {ObjectSetText("Darchelle"+DoubleToStr(i), CharToStr(241), 62, "Wingdings", clrGray);
if (RSI2[ArrayMinimum(RSI2,12,i+2)]>6) ObjectSetText("SOGZ"+IntegerToString(i),"E44 retrace", 26, "Impact", clrBlue);
else dir[i]=1;
}
else dir[i]=1;
}
/////red pullback-continuation
if (volup[i]<volup[i+1] && volup[i+2]<volup[i+1] && volup[i+1]>18
&& voldn[ArrayMaximum(voldn,6,i+6)]>30
&& voldn[ArrayMaximum(voldn,8,i+4)]>voldn[i+2] && voldn[ArrayMaximum(voldn,8,i+4)]>voldn[i+3] && voldn[ArrayMaximum(voldn,8,i+4)]>voldn[i+4]
&& voldn[ArrayMaximum(voldn,8,i+4)]>volup[ArrayMaximum(volup,8,i+4)]
&& voldn[ArrayMaximum(voldn,6,i+6)]>volup[i+1] && voldn[i+1]<volup[i+1]){
ObjectCreate("Rocketc"+IntegerToString(i),OBJ_TREND,indicator_window, Time[ArrayMaximum(voldn,6,i+6)],voldn[ArrayMaximum(voldn,6,i+6)],Time[i+1],volup[i+1]);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_COLOR,clrYellow);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_WIDTH,6);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_BACK,1);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_RAY_RIGHT,0);
ObjectCreate( "Banalisatia"+IntegerToString(i), OBJ_HLINE, 0, Time[0], Close[i+1]);
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_COLOR, clrYellow );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_WIDTH, 4 );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_STYLE, 1 );
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],35);
// ObjectSetText("SOG"+IntegerToString(i),"i-sell 4 Nleg down", 26, "Impact", clrPurple);
}
/////green pullback-continuation
if (voldn[i]<voldn[i+1] && voldn[i+2]<voldn[i+1]
&& volup[i+2]<voldn[i+1]
&& voldn[i]>volup[i]
&& voldn[i+1]>18 && volup[ArrayMaximum(volup,8,i+3)]>30
&& volup[ArrayMaximum(volup,8,i+3)]>volup[ArrayMaximum(volup,8,i+3)-1]
&& volup[ArrayMaximum(volup,8,i+3)]>voldn[i+1] && voldn[i+1]>volup[i+1]){
ObjectCreate("Rocketc"+IntegerToString(i),OBJ_TREND,indicator_window, Time[ArrayMaximum(volup,8,i+3)],volup[ArrayMaximum(volup,8,i+3)],Time[i+1],voldn[i+1]);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_COLOR,clrYellow);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_WIDTH,6);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_BACK,1);
ObjectSet("Rocketc"+IntegerToString(i),OBJPROP_RAY_RIGHT,0);
ObjectCreate( "Banalisatia"+IntegerToString(i), OBJ_HLINE, 0, Time[0], Close[i+1]);
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_COLOR, clrYellow );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_WIDTH, 4 );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisatia"+IntegerToString(i), OBJPROP_STYLE, 1 );
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],65);
//ObjectSetText("SOG"+IntegerToString(i),"i-buy 4 Nleg up", 26, "Impact", clrGreen);
}
/////green to green taper
if (volup[i]<volup[i+1] && volup[i+2]<=volup[i+1] && volup[i+3]<=volup[i+1]
&& volup[ArrayMaximum(volup,26,i+1)]>20
&& volup[i+1]>=voldn[ArrayMaximum(volup,4,i+1)]
&& ((volup[i+1]>9 && RSI2[i+1]>90) || volup[i+1]>=19)
&& volup[i+1]<33
&& volup[ArrayMaximum(volup,26,i+4)]>volup[i+1]
&& volup[ArrayMaximum(volup,12,i+1)]>voldn[ArrayMaximum(voldn,12,i+1)]
&& voldn[i+1]<volup[i+1]
&& High[i+1]==iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,6,i+1))
){
ObjectCreate("Rocket"+IntegerToString(i),OBJ_TREND,indicator_window, Time[ArrayMaximum(volup,26,i+4)],volup[ArrayMaximum(volup,26,i+4)],Time[i+1],volup[i+1]);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_COLOR,clrMediumSpringGreen);
if (High[ArrayMaximum(volup,26,i+4)]>High[+1]) ObjectSet("Rocket"+IntegerToString(i),OBJPROP_COLOR,clrLimeGreen);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_WIDTH,6);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_BACK,1);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_RAY_RIGHT,0);
if (Close[i+1]>iMA(symbol,0,16,0,MODE_EMA,PRICE_MEDIAN,i+1)){
if (i<300) {ObjectCreate("PitusX"+IntegerToString(i),OBJ_VLINE,0, Time[i+1], 0);
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_COLOR, clrWhite );}
if ((tup[ArrayMaximum(tup,5,i+5)]>0 && tup[ArrayMaximum(tup,10,i+11)]<1 && ((volup[i+1]<14 && RSI2[i+1]>90)
|| RSI2[i+1]>95)) && High[i+1]<High[ArrayMaximum(volup,26,i+4)]
) { ObjectSet("PitusX"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink );
if (i<300){
ObjectCreate( "Banalisation"+IntegerToString(i), OBJ_HLINE, 0, Time[0], High[i+1]+270*Point);
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_WIDTH, 3 );
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_STYLE, 1 );
ObjectCreate( "Banalisations"+IntegerToString(i), OBJ_HLINE, 0, Time[0], High[i+1]+530*Point);
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_WIDTH, 3 );
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_STYLE, 1 );
ObjectCreate( "Banalisationz"+IntegerToString(i), OBJ_HLINE, 0, Time[0], High[i+1]+780*Point);
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_WIDTH, 6 );
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_STYLE, 1 );
}
}
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_WIDTH, 4 );
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_BACK, 1 );}
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],75);
// ObjectSetText("SOG"+IntegerToString(i),"Cont/commit: "+DoubleToStr(NormalizeDouble(High[i+1]+40*Point,4),4), 26, "Impact", clrBlack);
if (High[i]>High[i+1]+30*Point) {
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],55);
// ObjectSetText("SOG"+IntegerToString(i),"Brk, buy "+DoubleToStr(NormalizeDouble(High[i+1]-40*Point,4),4)+","+DoubleToStr(NormalizeDouble(High[i+1]-80*Point,4),4), 26, "Impact", clrDarkGreen);
ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],35);
ObjectSetText("SOGZ"+IntegerToString(i),"BUY "+DoubleToStr(NormalizeDouble(High[i+1]-160*Point,4),4), 26, "Impact", clrDarkGreen);
}
tup[i]=1;
}
/////red to red taper
if (voldn[i]<voldn[i+1] && voldn[i+2]<voldn[i+1]
&& voldn[i+3]<voldn[i+1]
// && voldn[ArrayMaximum(voldn,10,i+1)]>25
&& voldn[i+1]>=voldn[ArrayMaximum(voldn,2,i+1)]
&& voldn[i+1]>11 && voldn[i+1]<=33
&& voldn[ArrayMaximum(voldn,19,i+4)]>voldn[i+1]
// && voldn[ArrayMaximum(voldn,8,i+1)]>volup[ArrayMaximum(volup,8,i+1)]
&& voldn[i+1]>volup[i+1]
&& voldn[ArrayMaximum(voldn,8,i+4)]>volup[ArrayMaximum(volup,8,i+4)]
&& Low[i+1]==iLow(symbol,0,iLowest(symbol,0,MODE_LOW,6,i+1))
){
ObjectCreate("Rocket"+IntegerToString(i),OBJ_TREND,indicator_window, Time[ArrayMaximum(voldn,19,i+4)],voldn[ArrayMaximum(voldn,19,i+4)],Time[i+1],voldn[i+1]);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_COLOR,clrDeepPink);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_WIDTH,6);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_BACK,1);
ObjectSet("Rocket"+IntegerToString(i),OBJPROP_RAY_RIGHT,0);
if (Close[i+1]<iMA(symbol,0,16,0,MODE_EMA,PRICE_MEDIAN,i+1)
){
if (i<300){ ObjectCreate("PitusX"+IntegerToString(i),OBJ_VLINE,0, Time[i+1], 0);
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_COLOR, clrWhite );
}
if (Close[ArrayMaximum(voldn,18,i+4)]<Close[i+1]) {ObjectSet("Rocket"+IntegerToString(i),OBJPROP_COLOR,clrThistle);
ObjectDelete("PitusX"+IntegerToString(i));}
if ((tdn[ArrayMaximum(tdn,5,i+5)]>0 && tdn[ArrayMaximum(tdn,10,i+11)]<1 && voldn[i+1]>15 && RSI2[i]<10) && Low[i+1]>Low[ArrayMaximum(voldn,19,i+4)]) { ObjectSet("PitusX"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink );
if (i<300){
ObjectCreate( "Banalisation"+IntegerToString(i), OBJ_HLINE, 0, Time[0], Low[i+1]-270*Point);
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_WIDTH, 3 );
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisation"+IntegerToString(i), OBJPROP_STYLE, 1 );
ObjectCreate( "Banalisations"+IntegerToString(i), OBJ_HLINE, 0, Time[0], Low[i+1]-530*Point);
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_WIDTH, 3 );
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisations"+IntegerToString(i), OBJPROP_STYLE, 1 );
ObjectCreate( "Banalisationz"+IntegerToString(i), OBJ_HLINE, 0, Time[0], Low[i+1]-780*Point);
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_COLOR, clrDeepPink);
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_WIDTH, 6 );
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_RAY_RIGHT, false );
ObjectSet("Banalisationz"+IntegerToString(i), OBJPROP_STYLE, 1 );
}
}
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_WIDTH, 4 );
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitusX"+IntegerToString(i), OBJPROP_BACK, 1 );}
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],55);
// ObjectSetText("SOG"+IntegerToString(i),"Cont/commit: "+DoubleToStr(NormalizeDouble(Low[i+1]-40*Point,4),4), 26, "Impact", clrBlack);
if (Low[i]<Low[i+1]-30*Point) {
// ObjectCreate("SOG"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],45);
// ObjectSetText("SOG"+IntegerToString(i),"Brk, sell "+DoubleToStr(NormalizeDouble(Low[i+1]+40*Point,4),4)+","+DoubleToStr(NormalizeDouble(Low[i+1]+80*Point,4),4), 26, "Impact", clrCrimson);
// ObjectCreate("SOGZ"+IntegerToString(i),OBJ_TEXT, 1, Time[i+1],35);
// ObjectSetText("SOGZ"+IntegerToString(i),"Brk, SELL "+DoubleToStr(NormalizeDouble(Low[i+1]+160*Point,4),4), 26, "Impact", clrCrimson);
}
tdn[i]=1;
}
///windflip down
if (Close[i+2]>fifty[i+2] && Close[i+1]<fifty[i+1] && Close[i]<fifty[i]) {dir[i]=-1;
ObjectCreate("PitussY"+IntegerToString(i),OBJ_TREND,1, Time[i], 50, Time[i], 100);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_COLOR, clrRed);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_WIDTH, 10);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_BACK, 1 );
}
///windflip up
if (Close[i+2]<fifty[i+2] && Close[i+1]>fifty[i+1] && Close[i]>fifty[i]) {dir[i]=1;
ObjectCreate("PitussY"+IntegerToString(i),OBJ_TREND,1, Time[i], 50, Time[i], 0);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_COLOR, clrGreen);
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_WIDTH, 10 );
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_STYLE, 2 );
ObjectSet("PitussY"+IntegerToString(i), OBJPROP_BACK, 1 );
}
}
deletetxt1("Lopez");
ObjectCreate("Lopez"+45,OBJ_LABEL,2, 0,0);
ObjectSet("Lopez"+45,OBJPROP_CORNER,1);
ObjectSet("Lopez"+45,OBJPROP_XDISTANCE,0);
ObjectSet("Lopez"+45,OBJPROP_YDISTANCE,00);
ObjectSet("Lopez"+45,OBJPROP_COLOR,clrGreen);
ObjectSetText("Lopez"+45,"Buy Excess Vol 32+",24,"Impact");
if (ExtATRBuffer[0]>ExtATRBuffer2[0]){
ObjectSet("Lopez"+45,OBJPROP_COLOR,clrDeepPink);
ObjectSetText("Lopez"+45,"Sell Excess Vol 32+",24,"Impact");
}
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);
}