LinReg indicator to LinReg EA

 

Hello community!

I am an absolute rooky in "programming" indicators or expert adisors. I am not a programmer, but I will do my very best for understanding the code, before combining it with code from other indicators. So I am not programmer, but rather a "combiner". :-)

But now I have a problem I cannot solve for myself and I hope that somebody can help me.

In the attachment you will find a simple regression indicator. I added an alert what will be executed when the price touches the borderline of the regression channel. Now I want to execute not only an alert, but also an order.For this I need an EA not an indicator. I can add a standard indicator in MT4 with "iMA" for example, if I want to use a moving average. But how can I implement my own indicator??? For the EA I need the calculation of the regression indicator. Can somebody show me please, how to implement the code of the indicator in the EA? I really don´t know what to do. :-(

THANKS A LOT!!!

Best regards
Christian

Files:
 
leochris:

Hello community!

I am an absolute rooky in "programming" indicators or expert adisors. I am not a programmer, but I will do my very best for understanding the code, before combining it with code from other indicators. So I am not programmer, but rather a "combiner". :-)

But now I have a problem I cannot solve for myself and I hope that somebody can help me.

In the attachment you will find a simple regression indicator. I added an alert what will be executed when the price touches the borderline of the regression channel. Now I want to execute not only an alert, but also an order.For this I need an EA not an indicator. I can add a standard indicator in MT4 with "iMA" for example, if I want to use a moving average. But how can I implement my own indicator??? For the EA I need the calculation of the regression indicator. Can somebody show me please, how to implement the code of the indicator in the EA? I really don´t know what to do. :-(

Really,  you don't want to do that,  if you are sure you do then read this series of articles:  Transferring an Indicator Code into an Expert Advisor Code. Indicator Structure

 

The much simpler way is to use iCustom() to get the buffer values you need from your Indicator into your EA.  More iCustom info

 
RaptorUK:

Really,  you don't want to do that,  if you are sure you do then read this series of articles:  Transferring an Indicator Code into an Expert Advisor Code. Indicator Structure

 

The much simpler way is to use iCustom() to get the buffer values you need from your Indicator into your EA.  More iCustom info


Thank´s a lot!

For me it is heavy enough to understand the "simple way". But at first glance this way really seems to be easier than transferring the indicator code into an EA.

Reason: