# Help modify the code

Hi
I have the following code to show how many times the minimum price has been tested for the exponential 50
I need the exact opposite
How many times the price of the exponential average 50 has been tested

``````ema50 = EMA(C,50);

BarsOver50 = BarsSince( L < ema50);
// Bars since Low was Less than ema, i.e. how long has it been above the ema

////////////////////
// Explore
///////////////////
aboveColor = IIf (L>ema50, colorLime, colorDefault);
Filter=1;
AddColumn(BarsOver50, "BarsOver50", 1.0, colorDefault, IIf(BarsOver50, colorYellow, colorDefault));
``````

Do you?

This shows that you are making no efforts to learn rather simply want to copy-paste generosity of others.

1 Like

[Cougar]

I need the exact opposite ?

How many times the price of the exponential average 55 has been tested

This shows that you are making no efforts to learn rather simply want to copy-paste generosity of others. ŲŲŲŲŲŲŲŲŲŲŲŲŲ

**** I need help and a beginner
All of you and I benefit from the efforts of others saved them .

@M2-new The point that @Cougar was making was that you do not appear to want to learn AmiBroker. Getting help on the forum is easy if you appear to be making an effort, and when using someone else's code giving them the appropriate credit.

For example, you have this solution from my earlier post

``````BarsSince( L < ema55)
``````

Did you try the exact opposite?

``````BarsSince( ema55 < Low)
``````

That really would not take much effort to at least make that attempt.

If that is what you are looking for then all combined,

``````///@link https://forum.amibroker.com/t/help-modify-the-code/12760/5

ema55 = EMA(C,55);

BarsOver55 = BarsSince( L < ema55);

// looking for the opposite of the above
emaAboveLow =  BarsSince( ema55 < Low);

////////////////////////////////////////////
// Add the new line to the previous Explore
////////////////////////////////////////////
aboveColor = IIf (L>ema55, colorLime, colorDefault);
Filter=1;