EA of Pivot point

 
Hi...
I think everyone already know about pivot, but this a glance of it


R2 = P + (H - L) = P + (R1 - S1)
R1 = (P x 2) - L
P = (H + L + C) / 3
S1 = (P x 2) - H
S2 = P - (H - L) = P - (R1 - S1)
Here, "S" represents the support levels, "R" the resistance levels and "P" the pivot point. High, low and close are represented by the "H", "L" and "C" respectively. (Note that HIgh low close are yesterday price)

i would trade if the price breaks R1 for example.

I've dificulty to write that into EA.
anyone can help? give me example so i can develop more..
thanks in advance
Reason: