Help !! About a simple code

 

Hello,

I would really appreciate if someone could kindly help me with this.


Lets say I have a pending order.

Step 01> When it get triggered, I want to open two pending order.

Step 02> If any of the pending orders get triggered, I want to close all pending orders and open two pending order again.

And repeat Step 02 again and again and again ... until I manually stop the program.


Please show me the main part (opening pending order when any existing pending order get triggered, and looping the process).

Any help would be great.

Thanks a million.

 

google might be helpful

https://www.mql5.com/en/forum/126575

 

Thanks a lot gjol.

I am not that good with MQL4, a little detail help would be great.

I am confused if there is two pending orders, how do I know if one got triggered.

Plus, I still need to figure out the looping.

 
AmareX:

I am confused if there is two pending orders, how do I know if one got triggered.

Plus, I still need to figure out the looping.

OrderSelect, the check OrderType . . a triggered pending order is no longer a pending order . . .
 
o, & this might be helpful 2
 

Thanks RaptorUK ..

But its still Greek to me !!


Please tell me if this would work:

Lets say I start with two pending order instead of one

Then check total pending order, if total pending order<2, then one got hit.

possible? is there a way to check the number of only pending orders?

 

RaptorUK ..

I guess I have started to understand what you have said, will work on it.

Thank you.