ADX-System - page 5

 

ADX signals

To explain the signals, we'll start seeing sgte ends. Downtrend when in range as it does when it starts and ends when the next trend

could someone tell me how I pass the file to power point

 

Wilder's ADX.mq4

Hi all,

I found this nice piece of code from Fernando Gomes I wanted to share which actually uses pure Wilder calculations. I know there are quite a few posts where people have noticed discrepancies between MT4 ADX calculations vs. Wilder's and I thought this would help. Can someone add an email alert when the DI +/DI - cross and then breaks through the ADX line (trend confirmation)? Thanks for any help!

Scott

Files:
 
mycobragoesfastr:
Hi all,

I found this nice piece of code from Fernando Gomes I wanted to share which actually uses pure Wilder calculations. I know there are quite a few posts where people have noticed discrepancies between MT4 ADX calculations vs. Wilder's and I thought this would help. Can someone add an email alert when the DI +/DI - cross and then breaks through the ADX line (trend confirmation)? Thanks for any help!

Scott

Our forum has been talking about problem of Wilder's indicator that comes with MT4 since 2006. Read this thread.

 

Wilder's ADX indicator Alert not working

Hello, I'm trying to add an Alert to this indicator when +DI and -DI cross on the closed bar but doesn't seem to be working. Can someone please take a look. I'm used to doing EA's so I'm probably not doing something right with the indicator code. Here is the code I added;

b_di_pP1 = 100.0 * dm_p_avg[1] / tr_avg[1];

b_di_mP1 = 100.0 * dm_m_avg[1] / tr_avg[1];

b_di_pP2 = 100.0 * dm_p_avg[2] / tr_avg[2];

b_di_mP2 = 100.0 * dm_m_avg[2] / tr_avg[2];

if(Alerts && (b_di_pP1 > b_di_mP1 && b_di_pP2 < b_di_mP2 || b_di_pP1 b_di_mP2))

{Alert("DI CROSS: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));}

Thank you

Files:
 
matrixebiz:
Hello, I'm trying to add an Alert to this indicator when +DI and -DI cross on the closed bar but doesn't seem to be working. Can someone please take a look. I'm used to doing EA's so I'm probably not doing something right with the indicator code. Here is the code I added;

b_di_pP1 = 100.0 * dm_p_avg[1] / tr_avg[1];

b_di_mP1 = 100.0 * dm_m_avg[1] / tr_avg[1];

b_di_pP2 = 100.0 * dm_p_avg[2] / tr_avg[2];

b_di_mP2 = 100.0 * dm_m_avg[2] / tr_avg[2];

if(Alerts && (b_di_pP1 > b_di_mP1 && b_di_pP2 < b_di_mP2 || b_di_pP1 b_di_mP2))

{Alert("DI CROSS: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));}

[/code]Thank you

You have made a mistake:you have included the two conditions in one "If" so alerts should play when all this condition are satisfied,and this can't happen!

[code]

b_di_pP1 = 100.0 * dm_p_avg[1] / tr_avg[1];

b_di_mP1 = 100.0 * dm_m_avg[1] / tr_avg[1];

b_di_pP2 = 100.0 * dm_p_avg[2] / tr_avg[2];

b_di_mP2 = 100.0 * dm_m_avg[2] / tr_avg[2];

if (i!=0){

if(Alerts && b_di_pP1 > b_di_mP1 && b_di_pP2 < b_di_mP2)

{

Alert("DI CROSS UP: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));

}

else if(Alerts && b_di_pP1 b_di_mP2)

{

Alert("DI CROSS DOWN: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));

}

}

return(0);

}

Files:
 
leledc:
You have made a mistake:you have included the two conditions in one "If" so alerts should play when all this condition are satisfied,and this can't happen!

b_di_pP1 = 100.0 * dm_p_avg[1] / tr_avg[1];

b_di_mP1 = 100.0 * dm_m_avg[1] / tr_avg[1];

b_di_pP2 = 100.0 * dm_p_avg[2] / tr_avg[2];

b_di_mP2 = 100.0 * dm_m_avg[2] / tr_avg[2];

if (i!=0){

if(Alerts && b_di_pP1 > b_di_mP1 && b_di_pP2 < b_di_mP2)

{

Alert("DI CROSS UP: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));

}

else if(Alerts && b_di_pP1 b_di_mP2)

{

Alert("DI CROSS DOWN: ",Symbol()," - ",Period()," at ", Close[0]," - ", TimeToStr(CurTime(),TIME_SECONDS));

}

}

return(0);

}

Thank you very much is it because it is an Indicator you have to make it possible for both conditions to happen? in an EA if the Statement isn't true then it will just ignore it. I thought I had it right.

Woops, it keeps Alerting every tick that the cross happened. Can I have it only Alert once?

 
matrixebiz:
Thank you very much is it because it is an Indicator you have to make it possible for both conditions to happen? in an EA if the Statement isn't true then it will just ignore it. I thought I had it right. Woops, it keeps Alerting every tick that the cross happened. Can I have it only Alert once?

Try now...In the previous request you have asked for the close bar so i haven't looked for other issues.Now it works,i have tested it with tester.

 
leledc:
Try now...In the previous request you have asked for the close bar so i haven't looked for other issues.Now it works,i have tested it with tester.

Nice:) Thank you

 

Rather than start a new thread for my question, thought I would put up my request on this adx thread.

What I am after is for the adx indi to either draw a box or colour the candles/bars once the dmi crosses a particular level, eg 25. So, say i have my candles red/green, and I set the dmi alert to 25, once dmi crosses 25, there is shaded box or the candles become eg blue, and remain blue/or the box continues to be drawen on the candles until such time that the dmi crosses back below 25.

My aim is to be able to count the number of candles that are fromed in a particular tf once the dmi has crossed a particular level.

I would much rather use the real wilder interpretation adx indi coded up by our great coders here.

Many thanks in advance.

Regards,

K.

 

ADX indi's?

henjay76:
for a long time i wait finally i got this indicator, thank you very much...

Did you have success with the ADX indi's? Just wondering.

Thanks,

So

Reason: