Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1675

 
законопослушный гражданин #:

Oh, shit. Where does it say that?

maybe i'm reading the log wrong?


16:54:00.479    2015.06.02 16:15:38  SMA на профитные - копия USDJPY,M15: true
16:54:00.479    2015.06.02 16:15:38  SMA на профитные - копия USDJPY,M15: open #4  sell 0.01 USDJPY at 124.141 ok

As you can see the order is open to sell and the next entry bCheckOrders() gives true

 
MakarFX #:

As you can see the order is open to sell and the next entry bCheckOrders() gives true

yes. i see it. but after the buy order it saysfalse

What should it say? The other way round?

 
законопослушный гражданин #:

Yes. I can see that. But after the buy order it saysfalse

What should it say? The other way round?

You should do it like this

 
MakarFX #:

bCheckOrders() does not work correctly!

I already wrote you a function for counting orders...

Do this, and it should work.

Instead of bCheckOrders(), put this function

and in OnTick(), instead of bCheckOrders() write this

Yes yes, I remember that function. Thanks.

I did. No effect.

Okay.

I guess there's no need to do anything.)

 
законопослушный гражданин #:

Yes, yes, I remember that function. Thank you.

I replaced it. No effect.

Okay.

I guess there's no need to touch anything)

No way!!!

Upload the file.

 
MakarFX #:

No way!!!

Put up the file.

which one?

 
законопослушный гражданин #:

which one?

Councillor
 
MakarFX #:
advisor

I've emailed you the code, but it's not cleared yet.

 

Can more than one TP be set for one order? We need a partial position fixing when the set prices are reached.

Expert Advisors that will fix a certain amount of points are not suitable. An EA that will close a certain amount of positions when a certain level is reached will be more suitable.

In other words, the programmer has entered a deal, set the level where the first TP should be done and specify that, when it reaches (touches this level), so much of the position should be closed. And so on.

There is something such?

 
TranceFM positions when a certain level is reached will be more suitable.

In other words, the programmer has entered a deal, set the level where the first TP should be done and specify that, when it reaches (touches this level), so much of the position should be closed. And so on.

Is there such a thing?

If you need to close 0.3 and then 0.7 from the 1st lot, it is easier to open two orders with different TPs without any wise thinking.