How to know with mql4 that hedge is prohibited with a specific broker

 

Hi all

Error code 149 ("Hedge is prohibited") that is returned to a client at the attempt to open an opposite position to an existing one if hedging is prohibited

But you need to try ordersend to know if it's ok or not !

How to know that in tne init() of an EA for example ?

thanks

 

You really should know that before opening an account with the broker!

There may be others not on this list that support hedging but this is a start http://www.100forexbrokers.com/brokers-for-hedging

-BB-

 
BarrowBoy:

You really should know that before opening an account with the broker!

There may be others not on this list that support hedging but this is a start https://www.mql5.com/go?link=https://www.100forexbrokers.com/brokers-for-hedging

-BB-


Thanks. I know that...but my customer may not :)
 

It is simple, if the broker is NFA registered then it must comply with the NFA's no-hedge-allowed rule.

The only ones who know are the broker and the NFA...there are no "marketinfo" flags set indicate algorithmically if hedging is disallowed. Sad, but true, at some point a human needs to talk to a human in this information loop.

If you wish to be algorithmic about it then you have to compile your own internal checklist of brokers that are NFA registered and then have your EA check the broker's AccountCompany() against the checklist you compiled...the danger here of course is your checklist is statically defined whereas reality is not...broker's are registering themselves with the NFA all the time.

 
Matutin:

Thanks. I know that...but my customer may not :)

Really...!

Excellent that you are thinking of worst-case scenarios but I believe you give them a short list of 'must haves' as prerequisites to using an EA, then if they order they are deemed to have those...

After all, if they try to use it on NinjaTrader, that isnt going to work either...

You can & I believe you should draw the line at a reasonable level of... sense

FWIW

-BB-

 

It is not something that you can do in the init, but when you attempt the first trade that would violate that policy, do an error trap for it, and notify the customer to either choose a different broker or accept the fact that their profits potential has just been cut in half. Then from that point forward, have your program operate within the confines of that policy.

There is nothing more pleasing than a disgruntled customer rebuting a bad policy that is supposed to be there to help them, and we know better. So when they find they have just lost half their earnings potential, they find another broker usually faster than you can help them to install MT4 for the new broker.

Education to your client is the best way to serve the client. Let broker with the NFA compliance worry about changing policy after they discover their loss of clients.

 

Thanks everybody !

info :

I have just test with Interbank Fx. NFA Broker to detect BUY/SELL STOP to receive "Hedging prohibited" but :

They accept a BUY trade and a SELL STOP Trade...but when market hit SELL STOP...they change OpenPrice...without message :)

 

that's just awesome...

 
Larry #:

It is not something that you can do in the init, but when you attempt the first trade that would violate that policy, do an error trap for it, and notify the customer to either choose a different broker or accept the fact that their profits potential has just been cut in half. Then from that point forward, have your program operate within the confines of that policy.

There is nothing more pleasing than a disgruntled customer rebuting a bad policy that is supposed to be there to help them, and we know better. So when they find they have just lost half their earnings potential, they find another broker usually faster than you can help them to install MT4 for the new broker.

Education to your client is the best way to serve the client. Let broker with the NFA compliance worry about changing policy after they discover their loss of clients.:

Larry

To know whether or not heding is permitted, one would need two or more orders (on the same symbol with atleast one of them in opposite direction. 

The lacune is fixed in MQL5 which is not of immense help to MQL4 world.

 
I was trading with freemater global and after raising a fair good amount the broker has suddenly switched off the phone and I don't know how to withdraw my life time invested money.  The withdrawal link is inactive I can see . Anyone who can help me pls.  Nikhil +971561404846
Reason: