One Trade per Cross

 

I'm trading using 3 Moving Averages (5, 13, and 50). The 50 Moving Average is my trend line and the 5 and 13 are my crosses. When the 5 Moving Average crosses over the 13 Moving Average (or vise versa) I'd like to enter the trade in the direction of the 5 Moving Average.


My issue is that when the price is trending the 50 Moving Average will stay steady relative to the 5 and the 13 Moving Averages. So I'd like to trade whenever the 5 Moving Average crosses over the 13 Moving Average, ONLY ONE trade per cross, but NO LIMIT on the number of CONSECUTIVE trades PROVIDING they have crossed over the 13 and back again.


How can I limit an EA in this way?

Reason: