Open long and short in MQL5

 

HI! Can MQL5 Open a long order without close it and open another short order? I'm new to MQL5, but I can do it in MQL4.

Thanks

Clive 

 

Directly - no, because of the new system of working with positions.

But this can be done virtually, see the article A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment for details.

 
Alexx:

Directly - no, because of the new system of working with positions.

But this can be done virtually, see the article A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment for details.

Thanks. single way trading doesn't seem really good for making profit. 

 

 
ClipWork:

Thanks. single way trading doesn't seem really good for making profit. 

 

Why?
 
Triangle Hedge
Triangle Hedge
  • votes: 22
  • 2012.07.30
  • Atsushi Yamanaka
  • www.mql5.com
Opens a virtual hedge position in MetaTrader 5.
 
enivid 2012.07.25 10:11 
ClipWork  2012.07.24 16:18 

Thanks. single way trading doesn't seem really good for making profit. 

 

Why?

Simple,

Trading using several trading strategy (automatic or manual trading) will definitely fail.

In effect :

1. There are no possibility trading several EAs with different trading strategies on one single pair. Very big LOL here.  

2. Can not copy trade from another traders. Forget , PAMM, MAM, they will definitely doom the account. 

Forget "don't put all eggs in one basket, read: don't put all your money in one trading strategy", just forget it. 

:D

 
onewithzachy:

Simple,

Trading using several trading strategy (automatic or manual trading) will definitely fail.

In effect :

1. There are no possibility trading several EAs with different trading strategies on one single pair. Very big LOL here.

2. Can not copy trade from another traders. Forget  PAMM, MAM, they will definitely doom the account. 

Forget "don't put all eggs in one basket, read: don't put all your money in one trading strategy", just forget it. 

:D

Then consider this:

When you are trading both long and short at the same time with same volume are you making any profit when you close both at the same time?

Track your trades with deals.  Calculate internally based on the HistoryDeals function, seperate your trading stratigys using magic numbers, you'll see that the strange case of the absence of a position is still trading.  where in mt 4 position 1 would be gaining 1 USD each pip price goes up and 1 position would lose 1 dollar every pip when price goes up = no open position in MT5 but 2 open positions in mt4, yet result is the same.

 I really don't see why everybody has a problem with MT5 when you can track everything. the only diffrence is you don't have an close Deal button. 

 
Financialarts:

Then consider this:

When you are trading both long and short at the same time with same volume are you making any profit when you close both at the same time?

Track your trades with deals.  Calculate internally based on the HistoryDeals function, seperate your trading stratigys using magic numbers, you'll see that the strange case of the absence of a position is still trading.  where in mt 4 position 1 would be gaining 1 USD each pip price goes up and 1 position would lose 1 dollar every pip when price goes up = no open position in MT5 but 2 open positions in mt4, yet result is the same.

 I really don't see why everybody has a problem with MT5 when you can track everything. the only diffrence is you don't have an close Deal button. 

Hi financialarts,

To answer your first sentence :  No, any dumb trader know without learning that no one makes any profits when open both direction and close them at the same time.

You are talking about open both direction and close at the same time and I was talking running different strategy EAs and NOT even talking open both direction and close them at the same time. When running several EA with different strategy in single pair, there may be opening on both long and short at the same time but will close at different time and there also may be opening on both direction at different time and close them at the same time. Open - Close time is not what I was talking about, its about running several different strategy EAs.

:D 

 


@ onewithzachy


I don't c your problem,
you base your ea's on the deals you made, not on the currently open position.
meaning whether you open or close using diffrent ea's,result will still be the same. thats why i used the example.
If you're going both long and short, the visual representation is that your not trading at all, but when you track the deals you'll see outcome is the same.

I'll draw a picture for you tommorow if you don't understand what i'm trying to say.
other example: 
market moves up 100 pips, market moves down 50 pips, market moves up 100 pips,

ea 1 opens long at start, when market is going down the 50 pips, ea 2 signals to go short, and closes at the 50 pips, when market reaches the final point, the first ea closes.

You tell me where this is diffrent from mt4 trading, or why this would affect outcome. if 2 diffrent ea's trade same pair.

 
Financialarts:


@ onewithzachy

I don't c your problem,
you base your ea's on the deals you made, not on the currently open position.
meaning whether you open or close using diffrent ea's,result will still be the same. thats why i used the example.
If you're going both long and short, the visual representation is that your not trading at all, but when you track the deals you'll see outcome is the same.

I'll draw a picture for you tommorow if you don't understand what i'm trying to say.
other example: 
market moves up 100 pips, market moves down 50 pips, market moves up 100 pips,

ea 1 opens long at start, when market is going down the 50 pips, ea 2 signals to go short, and closes at the 50 pips, when market reaches the final point, the first ea closes.

You tell me where this is diffrent from mt4 trading, or why this would affect outcome. if 2 diffrent ea's trade same pair.

Hi financialarts,

Thank you for your reply.

Could you do this : on MT5, open buy - say EURUSD at 0.01 lot, and then 3 minutes, or 17 minutes later, open sell same pair same lot.

Where is the buy now ?. Gone. That is why ClipWork said 

ClipWork  2012.07.24 16:18 

Thanks. single way trading doesn't seem really good for making profit. 

There's another trading restriction in MT5  https://www.mql5.com/en/forum/7275. You can share your opinion there.

BTW : what the use of Magic Number in MT5 anyway ? 

:D 

The basics do not work!
The basics do not work!
  • www.mql5.com
2) Everytime you make a new trade for a security where there is already a position open it resets the SL and TP to 0.
 

Hi financialarts,

Thank you for your comments, coz your comments make me think a little bit further on how to apply multi strategy EA on a single symbol and as a result I have several ideas but haven't explore them all.

Thank you to Alexx (admin) for the link. It does not help much, but gives ideas. 

May have to disregards some of my previous comment but not all though :) 

:D 

 

Reason: