Re: EA for MT5 dont work in 'Hedging Mode'
Doesn't MT tester test because of the BREXIT vote today?
Do I have to make FSB stop generating on Sundays or on holidays?
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Help and Support → EA for MT5 dont work in 'Hedging Mode'
Doesn't MT tester test because of the BREXIT vote today?
Do I have to make FSB stop generating on Sundays or on holidays?
I opened a topic in the MQL forums. I hope we will receive answer there.
I added to the thread, and another person has also commented.
Error: ActionTrade::ManageOrderSend(): OrderCheck(): Invalid price in the request
Please make a small modification and test if this error will disappear.
Open you MQL5 expert in the editor and search the following (use Ctrl + F ): ORDER_FILLING_FOK
Open a new line after that code and add the following line:
request.price = (type == OP_BUY) ? tick.bid : tick.ask;
Your code must look like that:
Please report the result.
You are a god
It ok for me. The open position is good (buy and sell) but now it's the closing of the position it doesn't work with no message in the history.
We're going forward.
Sorry for my english
the closing of the position it doesn't work with no message in the history.
I have an idea for the reason. I'll try to fix it during the weekend (if my MT5 starts testing/trading).
Hallo Popov,
I have tested your Solution on my Metaqoutes Demo-Accounts.
Demo in netting mode -> works perfecly, opens orders, set Sl and TP, close orders -> no Problem
Demo in Hedging mode -> now open orders, only the first one with SL and TP, opens many orders in the same time,
the orders never closed.
On my Alpari Demo Account cant test it, because trading is disabled.
There is a article that describes the netting and hedging mode in mt5
https://www.mql5.com/en/articles/2299
best regards
Yes, I read it already. I suppose that we have to give the current position as a parameter.
But I don't know (yet) how to detect if the MT works in a hedging mode.
i think you can add code for hedging that also runs in netting mode.
position — position ticket. Fill it when changing and closing a position for its clear identification while trading in hedging mode. In the netting system, filling the field does not affect anything since positions are identified by a symbol name.
from here:
http://www.metaquotes.net/en/metatrader5/news/4696
I'm working on that problem, but still cannot make it right.
The problem is that there is no working examples and the MQL documentation is very vague on that.
As per documentations I set the current position Ticket to the new order and it should Add, Reduce, Close, and Reverse but unfortunately only the reduce is working normally.
I opened a thread in the MQL forum here: https://www.mql5.com/en/forum/89553
However, as we know, the MetaTrader guys never solve the real problems.
Forex Software → Help and Support → EA for MT5 dont work in 'Hedging Mode'
Powered by PunBB, supported by Informer Technologies, Inc.