# learn how to earn money villagers [Episode 2] ! - page 343

The point of trading is that orders are closed simultaneously with the opening of pending orders, here in the Expert Advisor

a sit order is normally closed and open at the same time pending orders,

But the buy order closes 2 or 4 pips early without opening a pending order. :(

Some kind of half-assed Expert Advisor. :(

here's a comment on it from a developer :(

you know there are two prices in the market? ask and bid, you know?

I don't think so.

sell price - half Bid, take and stop on Ask, same for Sell Stop

these orders cannot be closed by a stop and a pending order cannot be opened simultaneously

so it needs to be tweaked, the deal does not match because of the spread.
Describe the problem in more detail.

khorosh:
Describe the problem in more detail.

If you set 1, the first order will be a buy order with Take Profit and Stop Loss set.

If you set TIP, the first order will be a buy order and the second one will be a stop loss order with Take Profit and Stop Loss set so the closing order will simultaneously open a pending order with its own Take Profit and Stop Loss.

but the position closes early and the pendulum has not opened.

If Tip 2 is set in the EA, the first order will be settled and it closes the current position normally and opens a pending order at the same time

If Tip 2 is set in the EA, the first order will be settled and it closes the current position normally and opens a pending order at the same time

It is difficult for me to understand. I would rather ask the author.

khorosh:
It's hard for me to understand. You'd better ask the author.
Well I already posted a comment, he said it's not real. :(

I think the condition could be formulated like this: if there is a closed order in the history, no matter if it is buy or sell, and no two pending orders are set, then two pending orders should be opened. The result will be the same as you want. Maybe I have got it wrong.

khorosh:
I think the condition could be formulated like this: if there is a closed order in the history, no matter if it is buy or sell, and no two pending orders are set, then two pending orders should be opened. The result will be the same as you want. Maybe I misunderstood something.
I'm trying to understand :)