Hello
i am new to trading and trying to learn coding....
Something i simply can not find any information on is cross-alerts for custom indicators.
To be more precise:
i want to get an alert when the Linear Regression crosses a Moving Average.
I was looking at code for crossover's for two moving averages on codebase:
double macurrent=iMAOnArray(ExtBuffer,0,5, 0,MODE_LWMA,0);
double macurrentslow=iMAOnArray(ExtBuffer, 0,10,0,MODE_LWMA,0);
double maprev=iMAOnArray(ExtBuffer,0,5,0,M ODE_LWMA,1);
double maprevslow=iMAOnArray(ExtBuffer,0,1 0,0,MODE_LWMA,1);
//----
if(maprev<maprevslow && macurrent>=macurrentslow)
Alert("crossing up");
If i wanted to do the same kind of cross but for a Linear Regression and Moving Average, i would have to create some kind of ICustom-Array, but i cant find out how to do that. Is it at all possible?
And if not, how would one do this?
Thank you in advance for any help ....
i am new to trading and trying to learn coding....
Something i simply can not find any information on is cross-alerts for custom indicators.
To be more precise:
i want to get an alert when the Linear Regression crosses a Moving Average.
I was looking at code for crossover's for two moving averages on codebase:
double macurrent=iMAOnArray(ExtBuffer,0,5, 0,MODE_LWMA,0);
double macurrentslow=iMAOnArray(ExtBuffer, 0,10,0,MODE_LWMA,0);
double maprev=iMAOnArray(ExtBuffer,0,5,0,M ODE_LWMA,1);
double maprevslow=iMAOnArray(ExtBuffer,0,1 0,0,MODE_LWMA,1);
//----
if(maprev<maprevslow && macurrent>=macurrentslow)
Alert("crossing up");
If i wanted to do the same kind of cross but for a Linear Regression and Moving Average, i would have to create some kind of ICustom-Array, but i cant find out how to do that. Is it at all possible?
And if not, how would one do this?
Thank you in advance for any help ....
in wondering about yourself, you forgot what you came here to be part of