MT5 a step backwards?? - page 6

 
n8937g:

jjc Maybe this will help you understand... [...] having buys and sells open at the same time.

Me too. My previous comment was clearly saying - or, at least, trying to say clearly - that I also have buys and sells open at the same time.


But there's nothing which can be done with "having buys and sells open at the same time" which is impossible to do with a series of single, serial, directional positions. Except in terms of the effect on account balance, rather than equity. MT4 doesn't always want you to work this way, but it's not impossible to achieve the same account-equity results with something which doesn't use hedged orders.

 

antro wrote >>

Gordon and detractors are assuming that both trades are entered at the same time....

Not really, I was just referring to the example (https://www.mql5.com/en/forum/121708) n8937g brought up...


The mathematical principles for opposite trades that are not opened at the same time are the same. If u open one order (buy or sell), and later in time open a second opposite order with exact same lot size, then it's better (IN MY HUMBLE OPINION) to close the first one than have 2 opposite open positions. The net effect on equity is identical (and I agree with jjc - equity is what matters. IMHO as well). Later on, at the point u intended to close one of the 2 open positions - just open the opposite one. And when u intended to close it, then close it. Again, the net equity would be identical.


A growing balance might be good for moral, but my investors wouldn't give a flying #uck about it. Equity is all they look at.

 
jjc:

Me too. My previous comment was clearly saying - or, at least, trying to say clearly - that I also have buys and sells open at the same time.


But there's nothing which can be done with "having buys and sells open at the same time" which is impossible to do with a series of single, serial, directional positions. Except in terms of the effect on account balance, rather than equity. MT4 doesn't always want you to work this way, but it's not impossible to achieve the same account-equity results with something which doesn't use hedged orders.

I could have written this myself. This is my exact opinion.


p.s. I too sometimes have opposite orders open at the same time... Simply because I have multiple experts trading. Experts that where not designed for a "no hedging" environment.

 
Gordon jjc...Please understand that I am trading the equivalent of TWO Martingale EAS on the same chart... One is going long and the other going short....everything you are saying is true BEYOND the first orders.....the larger second orders of the Martingale progression......But it is IMPOSSIBLE to have the initial orders recreated in MT5..(they offset and cancel out..). Actually 75 percent of the profits I generate are generated from these first level orders that are impossible to fool MT5 into mimicking....(These first level MT4 orders are closed at a profit before the next larger Martingale order would be placed...instead another first level order is placed again...)

Please understand...the profit is real....and absolutely not available with MT5 as it is today. I'll gladly supply actual results EURUSD for this last month that used this strategy for proof...many other strategies have not done very well....I have made very significant profits...I'm also a smarter man than I am a proud man...and would be very happy to learn your strategy is better...and learn more of it...but I must see proof..and/or understand it as a real winner. Actual result please not concept ....Thank you Again...

 
n8937g:
Gordon jjc...Please understand that I am trading the equivalent of TWO Martingale EAS on the same chart...

Such code has to be written very differently on MT5, and it's a lot more complicated, but it's not impossible. In essence, instead of using the position data provided by the platform, the EA needs to maintain its own internal position stats for each of the martingale systems it's running, based on the order history, and then place trades accordingly. The single position reported by the MT5 software then becomes nothing more than the net effect of all the orders across the two different martingales. The EA basically ignores this, and places its trades based on its own internal calculations of its separate positions.


Part of the fun of MT5 is that all EAs need to do this if they want to be compatible with other EAs trading the same symbol on the same account. An EA which uses the single position as reported by the MT5 platform potentially gets broken by the activity of another EA trading the same symbol. All EAs - or, at least, all commercial EAs - need to be fundamentally re-written to work reliably on MT5.


However, the fact that things have to be done very differently, and less intuitively, compared to MT4 doesn't mean that these things are impossible. People have been doing this kind of thing on other software platforms for years.


(EDIT: for completeness, repeating a point from above, the thing which simply cannot be replicated on MT5 is the ability to carry uncrystallised losses on the account while continuing to bank profits. EAs can behave identically on MT4 and MT5 in terms of account equity, but account balance will often look very different.)

 

jjc Yes I agree with almost everything you say EXCEPT that the initial two orders which I make a large percentage of my profit from is not possible ... I could only trade in ONE direction from the beginning...not TWO directions.... anyways...redoing all my work to no good reason is ridiculous...MT5 will not be a platform for me. I will evaluate all others if MT4 is unsupported....which thank God ...the Metaquotes says will not happen...

 

jjc Gordon...One other point, it would be a much simpler solution to just have 2 accounts with the same broker ..one for long ..the other for short...

 
n8937g:

it would be a much simpler solution to just have 2 accounts with the same broker ..one for long ..the other for short...

You run into significant issues with synchronisation between the EAs which are each trading one half of the total position. Plus things like the need to do periodic transfers between accounts to even up the money. In a fast-moving market there's the possibility of a margin call on one of the accounts despite the fact that the net position across the two accounts is profitable. (And I still don't agree with your "EXCEPT". What you're describing has been done many times on platforms other than MT4, none of which provide the MT4-style hedging in the form of each order constituting a separate position.)

 
n8937g:

but I must see proof..[...]

Right, proof.


The attached definitely won't be bug-free, because it's about 1,000 lines of code and I slogged through it in a couple of hours. However, the principle is sound. It shows an EA maintaining an internal, "virtual" list of hedged positions while nevertheless maintaining compliance with the no-hedging rule in terms of the orders which are actually placed into the market. In the simple example usage, the EA creates and monitors a virtual long position and a virtual short position simultaneously, but only ever actually has either longs or shorts (or nothing at all) in the market. The effect on account equity will be the same as running hedged orders.


It's doing what phampton has elsewhere called a "Virtual Order Manager". There are two basic rules to something like this: instead of using the OrderXXXX() functions in MT4, you instead use Virtual_OrderXXXX(). For example, the EA uses Virtual_OrderSelect() instead of OrderSelect(), and Virtual_OrderProfit() instead of Order_Profit(). Secondly, the EA needs to call the Run_VOM() function on every tick.


All this would actually be much easier in MT5. The thing which is difficult in MT4 is working round the fact that on an MT4 no-hedging account you're simply not allowed to place a short order if you're currently long. MT5 is not the end of the world.

 

JJc very interesting... Thanks...I'll take some time and study... (and see if I can simplify)... The idea of two seperate MT5 accounts may work too because the Buys and Sells need not be syncronized...they would trade completely independently with not even issues of "Is Trade Context busy"... but the downside as you say is you'll need twice the balance to trade two accounts...

Reason: