Math to code

 

In a recent article, a major news provider was making claims about a 21 year old millionaire that started trading using a simple math equation. Now the problem is how to test their theory and put the math equation to code. Here is the equation. The indicator works by also using the inverse of the formula below by using the lowest low for n number of periods. Where the two lines cross you enter and exit the trade. According to the source they ran many back tests and came up in the black every time. Now it is hard to believe but I want to try. How can we put the formula into code with a program like Monalis? The biggest problem for me is expressing the number of periods since highest high or since lowest low.

Files:
Formula.png  20 kb
 

what time frame are the "periods" here referencing is the question?

Reason: