No arrow buy on condition2

I have 2 condition to buy but they aren't appear When value above RSI(50) > 50.

MY CODE

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

//================= BUY & SELL ===============================
_SECTION_BEGIN("Buy & Sell");
Buy1		= EMA(C,5)>=EMA(C,20);
Buy2		= RSI(50) >=50;

Buy			= BUY1 AND BUY2;

PlotShapes( IIf(Buy, shapeUpArrow,shapeNone) , colorSkyblue, 0,81.8);

No%20arrow

@zhaud,

The code snippet that you show does not seem to be everything that gets shown on the chart. Perhaps there is something else happening, but we can't know or help if we don't have the full code.

For me, I find the Exploration a great tool to help me debug my AFL. I would suggest you set up an exploration showing each signal separately, then combined, and compare that to what you expect. Then you should have a better idea of where to look. You can also post the code here so we can help.

Quick glance looks like a sell hasn’t occurred yet so no buy. Backtest handles redundant signals but look at ExRem() function for plotting.

But perhaps that’s already in your AFL because your code should produce state signals with the >= instead of a cross() function.

My problem is solved.

Thanks Friends