Check for open Orders and if there is open Orders =>....??

 

Firs sorry for my bad English..


Now i need some script to chek, is there open orders.

Something like this:

if (OrderType()>1)
{
....
}

or MagigNumber, Order ticket...

I don't know, and while i have this problem, i can't see the final ideia of EA.
So please can somebady help me... please..


 

If you can, please study https://book.mql4.com// which will allow you to understand how MetaTrader system works. In the short and long time frame - you will be happy that you took time to read.

Enjoy

 
fbj:

If you can, please study https://book.mql4.com// which will allow you to understand how MetaTrader system works. In the short and long time frame - you will be happy that you took time to read.

Enjoy

Thank you verry much!

I understant, that this will be good for me, to know more.

But i can't find what i search and i was thing that someyaone have idea how must work..

my idea is:

When there is 1 open order -> buy wiht 1lot.

When there is 2 open order -> buy with 2lots... and more...

I thing is simply to write this code if you know the comands...

I'll be happy to help me..


SUCCESS!

 
_forex_ wrote >>

Thank you verry much!

I understant, that this will be good for me, to know more.

But i can't find what i search and i was thing that someyaone have idea how must work..

my idea is:

When there is 1 open order -> buy wiht 1lot.

When there is 2 open order -> buy with 2lots... and more...

I thing is simply to write this code if you know the comands...

I'll be happy to help me..

SUCCESS!

fwiw:

Maybe you need experienced s/w engineer that will work with you to turn your ideas into working software.

If so, search the forum using search form at top right of every site page and you will make contact.

Or you post on this and other forums that you require engineer to help you - many will require payment and many will fail also...

Whatever you do please beware that is not EZ path and is not fast either.

Best

 
fbj:

fwiw:

Maybe you need experienced s/w engineer that will work with you to turn your ideas into working software.

If so, search the forum using search form at top right of every site page and you will make contact.

Or you post on this and other forums that you require engineer to help you - many will require payment and many will fail also...

Whatever you do please beware that is not EZ path and is not fast either.

Best

Yes, it's right. But i don't want all code. I need only this 1 code line and i thing there is people who can help... only think that..

And i will see..


SUCCESS!

 
_forex_:

Thank you verry much!

I understant, that this will be good for me, to know more.

But i can't find what i search and i was thing that someyaone have idea how must work..

my idea is:

When there is 1 open order -> buy wiht 1lot.

When there is 2 open order -> buy with 2lots... and more...

I thing is simply to write this code if you know the comands...

I'll be happy to help me..


SUCCESS!

The function you require is OrdersTotal()

How come you couldn't manage to find that in the documentation section then?

 

if OrdersTotal() > 0

best make a function of it, and return a boolean (True/False)

Greets JB

Reason: