Need an expert to write this code for me

 
check previous bar<= 40
if cci > 100
set open buy of lot 1
$$ set order profit when close of previous bar - low of previous bar or If cci < -100
set order profit when close of previous bar - high of previous bar
stop loss = open of new bar - previous bar