Hello,
I have the GET Oscillator Top band breakout Exploration and screen shot at below. I only want to filter beginning of the 1st Breakout, which Oscillator start across water level, and I want disable the continuation 2nd Breakout.
I would appreciated your help.
_SECTION_BEGIN (" GET Oscillator ");
//=================================================================================
//GET Oscillator
AO = MA(Avg,4) - MA(Avg,34);
K = 1;
K2 = 5/80;
//---------------------------------------------------------------------------------
upperband[0] = Lowerband[0] = AO[0];
for(i = 1, j = 1; i < BarCount; i++)
{
if (AO[i] > 0)
{
upperband[i] = upperband[i-1] + K2*(K*AO[i] - upperband[i-1]);
j = i;
}
else upperband[i] = upperband[j];
}
for(i = 1, j = 1; i < BarCount; i++)
{
if (AO[i] < 0)
{
Lowerband[i] = Lowerband[i-1] + K2*(K*AO[i] - Lowerband[i-1]);
j = i;
}
else Lowerband[i] = Lowerband[j];
}
//---------------------------------------------------------------------------------
//moving averages
MA1 = EMA(C,100);
//--------------------------------------------------------------------------------
LSU = C > MA1 AND Cross (AO,upperband ) ;
SSU = C < MA1 AND Cross (Lowerband,AO) ;
//--------------------------------------------------------------------------------
//=================================================================================
//Explorer
//=================================================================================
Filter = LSU OR SSU;
SetSortColumns(4,-2,1);
AddTextColumn(WriteIf(LSU,"Long",WriteIf(SSU,"Short","-")),"Status",1.0,colorBlack,
IIf(LSU,colorBrightGreen,IIf(SSU,colorRed,colorDefault)),50);
AlertIf(LSU,"SOUND C:\Windows\Media\chimes.WAV", "Buy", 3);
AlertIf(SSU,"SOUND C:\Windows\Media\chimes.WAV", "Short", 3);
//=================================================================================
_SECTION_END();
Regards
Steven