Can someone help me to code this simple EA

 

Looks to be very simple to code, i just need a start point from someone

s1

Reason: