EA to avoid broker limitations for stop orders

 

Hello, Friends,

my broker (and yours too, probably) has unpleasant limits for entering STOP orders. Sometimes I would need to enter BUY STOP (or sell stop) and it is not possible as it requires me to enter a price that is 20, 50 or so pips from the current price. This makes some trades impossible. When I enter at a market price the trade is not good and I have to break my entry rules. Would you please know about an EA that would allow me to enter the type of the order (buy/sell stop) and price and then send the order as MARKET when the price reaches the required level?

Thank you very much! Pavel

 

Yes but you must specify which terminal you are using.

Look in codebase: https://www.mql5.com/en/code


MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
MQL5 Source Code Library for MetaTrader 5
 
Marco vd Heijden:

Yes but you must specify which terminal you are using.

Look in codebase: https://www.mql5.com/en/code



Hello, it is Metatrader 4. The codebase is so large and I do not know how to find it, that is the problem... It may sound stupid but this is because of my English...

Thanks!

 
trader995: it requires me to enter a price that is 20, 50 or so pips from the current price.
I doubt that. More like "20, 50 or so" points. A pip is not a point on a 5 digit broker. You can't move stops closer to the market than the minimum (MODE_STOPLEVEL * _Point.) Same for pending orders.
          Requirements and Limitations in Making Trades - Appendixes - MQL4&Tutorial
trader995: it is Metatrader 4.
Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
          General rules and best pratices of the Forum. - General - MQL5 programming forum
 

Excuse me for posting in an incorrect forum.

Yes the limitation is eg. 200 points for AUD/NZD, so I said 20 pips.

And I understand the problem with pending orders. The EA that I was asking about should avoid this - I would use a parameter which would be the price that I would like to use for the STOP order (if it was not limited by the broker). The EA would test the actual price and when the price would reach my limit (where I wanted to have a STOP order) the EA would send a MKT order. This way I would not be limited by the currency pair limitations.

Thank you and if it is better, just delete my thread... Pavel

 
trader995:

Excuse me for posting in an incorrect forum.

Yes the limitation is eg. 200 points for AUD/NZD, so I said 20 pips.

And I understand the problem with pending orders. The EA that I was asking about should avoid this - I would use a parameter which would be the price that I would like to use for the STOP order (if it was not limited by the broker). The EA would test the actual price and when the price would reach my limit (where I wanted to have a STOP order) the EA would send a MKT order. This way I would not be limited by the currency pair limitations.

Thank you and if it is better, just delete my thread... Pavel

Yes, we understand your question and yes, it can be done in code (MT4 or MT5), so as to get around some of the limitations, by using Market orders to simulate Pending Orders.

Unfortunately, I don't believe you will find exactly what you want. Maybe you can find something that is almost what you want but not quite.

So, depending on if you want to invest time or money, you can either invest in "education" and learn to code it yourself (which will take quite a long time), or you invest money and hire someone to code it for you (eg. in the Freelance section).

Another choice is to befriend a fellow trader/coder and work together in coding such a project.

 
Fernando Carreiro:

Yes, we understand your question and yes, it can be done in code (MT4 or MT5), so as to get around some of the limitations, by using Market orders to simulate Pending Orders.

Unfortunately, I don't believe you will find exactly what you want. Maybe you can find something that is almost what you want but not quite.

So, depending on if you want to invest time or money, you can either invest in "education" and learn to code it yourself (which will take quite a long time), or you invest money and hire someone to code it for you (eg. in the Freelance section).

Another choice is to befriend a fellow trader/coder and work together in coding such a project.


Dear Friend, thank you, I can write the EA by myself, I have written some in the past. I will need to refresh my education. I hoped that there is some EA already available.

Thank you all for trying to help! Pavel

Reason: