Very good ts for stoch. Help me!!!

 

Has this simple ts for metastock given good results, who helps me to transform him/it for metatrader?

LR:= LinearReg(C ,21);

minlr:= LLV(lr, 21);//The least one of the Linear regression

maxlr:= HHV(lr, 21);//the maximum of the linear regression

LR;minlr;MaxLr;

If it serves for understanding what it does I can send a graph.

The trading is long when the linear regression detaches him from the least one and goes toward the the maximum or the opposite one for short. Other signals can be had, but for now me enough this. Who able is to help me, around I have not found anything that he/she works in this way.

 

If you want a linear regression indicator, look here:

https://www.mql5.com/en/forum/173413

 

the indicator linear regression I have him, but I am not able to write the code that finds the maxLR and the minLR some indicator as they make besides giving the order of purchase or sale if the linear regression touches the channel and then it reverses the trend.

Files:
lr.jpg  36 kb
Reason: