pivot indicator in MT3.83

 
Could somebody help to write the following indicator?

Input
PreviousHigh(PH),PreviousLow(PL),PreviousClose(PC) ,

Output:
CDP=(PH+PL+PC)/3
AnalysisHigh1=CDP+(PH-PL)
AnalysisHigh2=2*CDP-PL
AnalysisLow1=CDP-(PH-PL)
AnalysisLow2=2*CDP-PH

Mark AH1,AH2,AL1,AL2 in chart for reference.

Thanks in advance
 
http://www.strategybuilderfx.com/forums/showthread.php?t=15332

This is for MT4, but you should be able to modify the code for MT3...