Questions from Beginners MQL5 MT5 MetaTrader 5 - page 217

 
Hello. Can you tell me please. I have an EX4 file (robot), how can I get an MQL4 file to it?
 
539exnkx:
Hello. Can you tell me please. I have an EX4 file (robot), how can I get an MQL4 file to it?
contact the author/coder
 

Here's another question. Let's assume we open a position from the market and set a stop loss on it. And at the level of the stop-loss we place another pending order with our own stop-loss. If the price reaches this level, is it guaranteed that the stop loss of the open position will be executed first? Or is it possible that the second order will be executed first and then the stop loss of the first trade will not be executed at all, but will be moved to the stop loss level of the pending order?

For example, we open a Buy position with lot 2, place a stop loss at 1.3000 and set the Buy Limit at lot 3 with our stop loss there as well. When the price reaches 1.3000, is it guaranteed that the position size will be lot 3? Or could it be lot 5 with a stop loss equal to the bylimit's stop loss?

 
newdigital:
contact the author/coder
The author is not known, but I can describe the strategy myself or is it easier to reorder the robot?
 
Algo:

Here's another question. Let's assume we open a position from the market and set a stop loss on it. And at the level of the stop-loss we place another pending order with our own stop-loss. If the price reaches this level, is it guaranteed that the stop loss of the open position will be executed first? Or is it possible that the second order will be executed first and then the stop loss of the first trade will not be executed at all, but will be moved to the stop loss level of the pending order?

For example, we open a Buy position with lot 2, set the stop loss at 1.3000 and set the buy limit at the same level with lot 3. When the price reaches 1.3000, is it guaranteed that the position size will be lot 3? Or could it be lot 5 with a stop loss at the level of the bylimit stop loss?

Good question. I guess it all depends on the size of the kitchen you're trading in ))
 
micle:
Good question. I guess it all depends on the size of the kitchen you're trading in ))
Doesn't it depend on the algorithm of the MT server part? Generally speaking, that's a question for the developers. Are they ever in this thread, or is it better to ask them somewhere else?
 
Algo:

Here's another question. Let's assume we open a position from the market and set a stop loss on it. And at the level of the stop-loss we place another pending order with our own stop-loss. If the price reaches this level, is it guaranteed that the stop loss of the open position will be executed first? Or is it possible that the second order will be executed first and then the stop loss of the first trade will not be executed at all, but will be moved to the stop loss level of the pending order?

For example, we open a Buy position with lot 2, set the stop loss at 1.3000 and set the buy limit at the same level with lot 3. When the price reaches 1.3000, is it guaranteed that the position size will be lot 3? Or maybe it will be lot 5 with a stop loss equal to the bylimate's stop loss?

Stop order - guarantees that it will execute when the price is reached, but does not guarantee the price at which it will be executed.

Limit order - guarantees the price at which it will be executed, but does not guarantee that it will be executed when it reaches a specified price.

Therefore, when the price reaches 1.3000, a stop order will trigger and close the buy order at the current price (not necessarily 1.3000) and a limit order may not trigger as long as the price of 1.3000 is the lowest price. If the price goes down to 1.2900, but your limit order is still not working, you have the right to complain to your broker.

 
Algo:
Isn't it from the algorithm of the MT server part? Generally speaking, this is a question for the developers. Are they in this thread, or is it better to ask them elsewhere?
They do. The server part is just a gateway... I think regarding order execution a lot depends on the broker and not on the server part.
 
Algo:
Isn't it from the algorithm of the MT server part? Generally speaking, this is a question for the developers. Are they in this thread, or is it better to ask them somewhere else?
Rather on the withdrawal algorithm of your broker's positions. If the broker has multiple liquidity providers, then the stop orders may actually be stored on the broker's server as regular market orders. This has to do with the fact that at the moment of setting a stop order, the broker does not know yet, which of the liquidity providers will give the requested price first, so at the moment of setting it is not known, where exactly this order should be output.
Algo:
...or is it better to ask somewhere else?
Read this thread.
 
C-4:

Stop order - guarantees that it will execute at a specified price, but does not guarantee its strike price.

Limit order - guarantees its execution price, but does not guarantee that it will execute when it reaches a specified price.

Therefore, when the price reaches 1.3000, a stop order will trigger and close the buy order at the current price (not necessarily 1.3000) and a limit order may not trigger as long as the price of 1.3000 is the lowest price. If the price goes down to 1.2900, but your limit order is still not working, you have the right to complain to your broker.

Thanks for the insight, but that's not what I was asking.