Questions from a "dummy" - page 16

 
Cron:

...I still think that"TRADE_ACTION_CLOSE" could be added for the convenience of many DC users. [ And for example to disable this type of operation where netting is important? (FORTS, RTS)].

For me developers' silence sometimes means more than all our questions/suggestions put together.
 
Cron:

Yes, removing SL/TP is a waste of time plus the risk of being left in the market without a stop in case of connectivity problems.

I think, however, that"TRADE_ACTION_CLOSE" could be added for convenience of many users working in DC. [ And for example to disable this type of operation where netting is important? (FORTS, RTS)].

Without some steps towards user there is no sense for many clients of brokerage companies to switch to MT5. Having some experience in programming I still faced some difficulties when porting an EA from MQL4 to MQL5. But all of them were solved one way or another except this SL/TP problem and closing from the market.

I dont want to teach developers what they can do better than me, but I want to mention that chasing a universal product for exchangers and brokerage companies to the detriment of userfriendly will lead to lower demand for the product and many people will stay on MT4 :(

1. If we are talking about a profitable position then it is either not worth touching it or move it to a slightly worse price (within CUE of course). And TP pulling down is not very serious.

As for the losing positions, the matter is more serious and something special should be done.

2) It is better not to take risks and think about closing options in advance (without waiting until the price is close to TP/SL).

3. All who want to switch to MT5 will do it no matter what, and those who don't think it is necessary to do it, will always find reasons.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования - Документация по MQL5
 
papaklass:
I don't see any problem with your situation. Move the stop as close to the market as possible (stopLevel). In this case you will have a close on stoploss. Sacrifice a few points of profit/loss for the sake of a confident result.
For profitable trades that really need to be closed, this is almost ideal. Although you can try to manage both SL and TP in this way, which will allow you to close the position almost losslessly (if the risks are reasonable).
 
Документация по MQL5: Стандартная библиотека / Торговые классы / CTrade / PositionClose
Документация по MQL5: Стандартная библиотека / Торговые классы / CTrade / PositionClose
  • www.mql5.com
Стандартная библиотека / Торговые классы / CTrade / PositionClose - Документация по MQL5
 
It does not guarantee 100% closing of a position in the vicinity of TP/SL levels. Although, if used skillfully, it solves almost all issues related to position closing.
 
There is no100% guarantee. And there won't be.
 
Manov:
There is no 100% guarantee. And there won't be.

The option suggested by Papaklass is almost ideal (under certain conditions and risks). Of course, it also will not give a 100% guarantee, but still if I understand correctly in this case, either SL/TP levels will be set to the right level or the position will close and then the action will not make sense (although a possible error is better to handle).

 
papaklass:
I don't see a problem in your situation at all. Move your stop as close to the market as possible (stopLevel). In this case you will have a stoploss. You should sacrifice a few points of profit/loss for the sake of a confident result.

Thanks for the option, but sometimes you need to cover a position before the news comes out and the stopgap can be stretched to unacceptable limits, say 50 pips on a 4 marker.

That is why stop pulling cannot be a universal solution, unfortunately for me :(

 

This method does exactly the same thing that I do to close a position (without using classes).

Even for distant SL/TP there is a non-zero probability that the price will reach SL/TP within the time frame of the request.

For example SL is 50p away. This seems like a lot and the position will be closed 1000 times but 1001 times there will be a news or volatile market and the closing will fail.

1 out of 1000 is not critical, but giving the reins of trading to an Expert Advisor we want to avoid unpleasant surprises (the more so because in MQL4 this operation was simpler).

 
Interesting:

1. If we are talking about a profitable position, then either leave it alone or move it to a slightly worse price (within the limits of the CU of course). And TP pulling down does not threaten anything serious.

As for the losing positions, the matter is more serious and something special should be done.

2) It is better not to take risks and to consider closing options in advance (without waiting until the price is close to TP/SL).

3. If you have any questions or doubts about the project, you will always try to understand the source of the code and the meaning of the code.

2. Unfortunately, the trading algorithm does not allow closing "in advance". The exp broker tries to close a position when the signal comes. Failure to close the signal is a potential loss.

3) I want to switch to MT5! :) I cannot because of some small problem that developers are still silent. I want to hear their version: why in MQL4 I have a guaranteed close position with SL/TP, and cannot do it in MQL5.

Reason: