linear regression channel missing code

 

Hello

I need your help in programming a (pre determined initial and ending dates) linear regression channel with (sound alert, notification and send email) in all cases of crossing the mid line of the channel or moving outside.

thanks in advance

 
ahm_zoz:

Hello

I need your help in programming a (pre determined initial and ending dates) linear regression channel with (sound alert, notification and send email) in all cases of crossing the mid line of the channel or moving outside.

thanks in advance

What have you tried so far ?
 
angevoyageur:
What have you tried so far ?
I tried to learn some mql4 lang. but I failed, then I'm trying to create this linear regression channel indicator by editing some ready available indicators but I'm still so far :(
 

int start()
{
int counted_bars=IndicatorCounted();
ObjectCreate(TLineName, OBJ_REGRESSION, 0, Time[25], Bid, Time[0], Ask);
ObjectSet(TLineName, OBJPROP_STYLE, LineStyle);
ObjectSet(TLineName, OBJPROP_COLOR, LineColor);


double val=ObjectGetValueByShift(TLineName, 0);
if (Bid-AlertPipRange*Point <= val && Bid+AlertPipRange*Point >= val) PlaySound(AlertWav);{
PlaySound(AlertWav);
SendMail("TLine Alert","T Line Alert Pip Range");
SendNotification("T LIne Alert Pip Range");
}

 
ahm_zoz:

int start()
{
int counted_bars=IndicatorCounted();
ObjectCreate(TLineName, OBJ_REGRESSION, 0, Time[25], Bid, Time[0], Ask);
ObjectSet(TLineName, OBJPROP_STYLE, LineStyle);
ObjectSet(TLineName, OBJPROP_COLOR, LineColor);


double val=ObjectGetValueByShift(TLineName, 0);
if (Bid-AlertPipRange*Point <= val && Bid+AlertPipRange*Point >= val) PlaySound(AlertWav);{
PlaySound(AlertWav);
SendMail("TLine Alert","T Line Alert Pip Range");
SendNotification("T LIne Alert Pip Range");
}

this was a trend line indicator with alert :D untill i tried to editing it !