How can i create a custom indicators of PR?

 

Hi,professors !

I want to get your help: how to compile the custom indicators of PR.

The main body of PR is just below:

Pr1=(iMA(NULL,PERIOD_H1,10,0,MODE_SMA,PRICE_CLOSE,0)-iMA(NULL,PERIOD_H1,20,0,MODE_SMA,PRICE_CLOSE,0));

Pr2=(iMA(NULL,PERIOD_H1,10,0,MODE_SMA,PRICE_CLOSE,1)+iMA(NULL,PERIOD_H1,10,0,MODE_SMA,PRICE_CLOSE,2)-iMA(NULL,PERIOD_H1,20,0,MODE_SMA,PRICE_CLOSE,1)- iMA(NULL,PERIOD_H1,20,0,MODE_SMA,PRICE_CLOSE,2));

PR= Pr1/Pr2;

long for you answer ! Thank you very much !

Reason: