Coding help - page 438

 
Jeeves:
Hi mladen....another cry for help.

I have tried to adapt the attached 3 Ducksindicator so that it will use the 'Advanced_ADX' indicator rather than an SMA in it's calculations. It seems to compile without a problem, but when placed on a chart, it does not agree with the attached 'Advanced_ADX' indicator.

I would be grateful if you would run your very capable eye over it for me, & fix what needs fixing!

Jeeves

As far as I see it is still using SMA for calculations (see lines 54 through 60).

 
Jeeves:
Hi Guy...many thanks for the reply.

I have replaced the 'ima- in those lines with 'iadvanced_ADX'.

Following along those line (54-60) do I need to alter or take out the 'Mode.......' function?

Jeeves

For advanced adx you must use the iCustom() function to retrieve values from it. You can find the explanation on iCustom() function here : https://www.mql5.com/en/forum/173108

 
mladen:
neverbeast

At this post you have an example how you can use time filter for any code you want to use : https://www.mql5.com/en/forum/184052 . It is rather simple (to copy it and paste) so you can apply that filter any way you wish in the tester indicator.

PS: the problem you might find is that indicators will not skip the time filtered out. For that all the indicators should be completely rewritten in order to make them skip the prices that are outside the required filter (and since those are built in indicators, that is not possible)

What about this solution? Seems to be working.

extern string Start ="08:00";

extern string End =

"22:00";

string TimeCur = TimeToStr(Time[i], TIME_MINUTES);

if(TimeCur>Start&&TimeCur<End){

//do something }
 
mladen:
Jeeves As far as I see it is still using SMA for calculations (see lines 54 through 60).

Hi Guy...many thanks for the reply.

I have replaced the 'ima- in those lines with 'iadvanced_ADX'.

Following along those line (54-60) do I need to alter or take out the 'Mode.......' function?

Later - Now it's telling me it doesn't recognise - 'iadvanced_adx' Help!

 
neverbeast:
What about this solution? Seems to be working.
extern string Start ="08:00";

extern string End =

"22:00";

string TimeCur = TimeToStr(Time[i], TIME_MINUTES);

if(TimeCur>Start&&TimeCur<End){

//do something }

Nice short code And yes, it will work

 
mladen:
Jeeves For advanced adx you must use the iCustom() function to retrieve values from it. You can find the explanation on iCustom() function here : https://www.mql5.com/en/forum/173108

Ok I'm on it!

 

No sorry mladen....all double Dutch to me. But I appreciate the help...it's just me!

 

close_all_open_orders.mq4

Hello ,Mr Mladen i have a script i use it at newstime for closs all open positions but when it close my expert is very sensible it open trades after smal reaktion ..i need a fix in my script that it close all order like it do and stop autotrade ( STOP EXPERT

ADVİSOR)... Can u check this Thanks in Advance..

 

Hello,

this indicator doesn't seem to make alert well. I feel like it makes alert only once after the mt4 is started and after the 1st alert it doesn't make sound. I also realized that it makes sound only when the bar is "climax".. but I want it to make sound when the bar is "rising".

Could anyone fix this code for the volume indicator?

if you have time to do the same for this candle indicator I appreciate that, but I don't wanna take too much of your time.

Thank you in advance.

 

Hello again.

So I've made simple indicator with arrows. Unfortunately it's not drawing them as I wanted to. My goal was showing an arrow when conditions are met but when conditions aren't met anymore it should delete that arrow. As an example: In 15 seconds of current candle conditions are met and it draws an arrow then it changed direction and conditions aren't met anymore so it should delete that arrow before close of current candle. Currently it draws arrows when conditions are met and doesn't repaint at all, plus there are expiration arrows showing if it went ITM or OTM/ATM that are not drawing at all till refresh. Could someone take a look and help me fix it, please?

6s.mq4

Files:
6s.mq4  4 kb