GET Oscillator Breakout

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.

GET%20breakout%20screenshot

_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

@Steven when you post some code you should do it properly (using the </> button in the forum text editor toolbar or using 3 back-ticks above and below each source code section).

Moreover, ideally, you should always try to post "working code" (I mean that I expect to see no errors if I paste it in my AmiBroker code editor and run it and in the case of an indicator I should be able to apply it and visualize it in my charts).

You posted an image for the oscillator, but actually, the sample code does not plot it.
For me, it is not very difficult to figure out how to do it, but some other users will probably stop here looking at your post....

In any case, please, try to explain more in details what you want to achieve.

I only want to filter beginning of the 1st Breakout, which Oscillator start across water level, and I want to disable the continuation 2nd Breakout.

What do you mean exactly by "filter beginning of the 1st breakout"?
Do you want to use as a Buy signal the bar when the AO oscillator line crosses up the upper band line?
"I want to disable the continuation 2nd Breakout" means to sell when it crosses down it?
Or do you mean something else?

Please, elaborate on your request, otherwise, it will be difficult to provide you with any further feedback.

(And. if possible. post - within the required code tags - the code with the missing parts).

5 Likes