Coding help - page 404

Mladen Rakic
186563
Mladen Rakic  
Jeeves:
Hi Guy, good of you to reply. Sorry, I was a bit crisp with the post....I currently use a one period colored MA on the main window, & a 1 period ADX histogram in a lower window. I would dearly like to use 1 period ADX as a replacement for the colored MA in the main window. But I suspect I'm asking for the impossible!.

Jeeves

ADX can not be drawn in the main window in the form of lines

pking25
242
pking25  

Many thanks my friend.....I can stop my frantic searching now!! Have a great Christmas, but have an even greater New Year!

Kamil
42
Kamil  

Need to count the spikes up, on a given interval.

The indicator shows nothing.

What are doing wrong?

Files:
shipk.mq4 2 kb
pking25
242
pking25  

I thought my last post would be it until the New Year, but I have just tried to use an old indicator I found on a disc......& it gave me 64 errors!! It is an old one. If you have the time, could you do your magic for me.......again!

Tomcat98
186
Tomcat98  
Jeeves:
I thought my last post would be it until the New Year, but I have just tried to use an old indicator I found on a disc......& it gave me 64 errors!! It is an old one. If you have the time, could you do your magic for me.......again!

Here is it.

Have a good WE.

Tomcat98

pking25
242
pking25  

Many thanks Tomcat98, appreciate the response. Have a great Christmas

pking25
242
pking25  

Hi guys...me again. Another one from my files. A trillion 'error' reports when I try to compile it. Would appreciate it if you could make them vanish!!! This one is better for me, it allows different values for each line. When I finally get myself settled I will be posting my system, together with due praise for all the people who have contributed. (That should overload the site!) Just joking....don't cut me off!

Files:
Tomcat98
186
Tomcat98  

Hi coders...

Question about closing orders:

Let's say I've got multiple (20 or more) BUYLIMIT Orders.

Why MT4 doesn't want to close all orders at the same time if I write this:

if(OrderType()==OP_BUYLIMIT)

if(( Blah Blah ) <= (Blah Blah ))

{

_OrderDelete=OrderDelete(OrderTicket());

}

Some orders still remain till next candle. It seems to me that M4 cannot close all at the same time in case of multiple orders to delete.

Now, how should I code it to close all pending _orders at the same initial time?

Thanks for your help and for your time.

Sincerely.

Tomcat98

Mladen Rakic
186563
Mladen Rakic  
Tomcat98:
Hi coders...

Question about closing orders:

Let's say I've got multiple (20 or more) BUYLIMIT Orders.

Why MT4 doesn't want to close all orders at the same time if I write this:

if(OrderType()==OP_BUYLIMIT)

if(( Blah Blah ) <= (Blah Blah ))

{

_OrderDelete=OrderDelete(OrderTicket());

}

Some orders still remain till next candle. It seems to me that M4 cannot close all at the same time in case of multiple orders to delete.

Now, how should I code it to close all pending _orders at the same initial time?

Thanks for your help and for your time.

Sincerely.

Tomcat98

Tomcat98

What does the loop in which you are trying to close those orders look like?

Tomcat98
186
Tomcat98  

Hi Mladen,

Here is what the loop says for those pending orders where Multi_Indic_00 is an oscillator and Up_Prime_00 is a define level.

//+--------------------------------------------------------------------+

//---- Check And Close If Order Type is Limit And Trend has Changed.

if(OrderType()==OP_BUYLIMIT)

if(( Multi_Indic_00 ) <= (Up_Prime_00 ))

{

_OrderDelete=OrderDelete(OrderTicket());

}

if(OrderType()==OP_SELLLIMIT)

if(( Multi_Indic_00 ) >= ( Down_Prime_00 ))

{

_OrderDelete=OrderDelete(OrderTicket());

}

//+--------------------------------------------------------------------+

Well nothing special....

Happy trading.

Sincerely.

Tomcat98