molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Tue May 14, 2024 7:33 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Maximum Number of Positions
PostPosted: Sun Feb 17, 2013 10:18 am 
Offline

Joined: Sun Oct 07, 2012 3:40 am
Posts: 13
Hello,

May I suggest that feature will also include pending orders posted by "BuyP"/"SellP".
The reason for this is that when a Buy/Sell stop order is being executed, immediately the system fires the next pending order that fulfills the condition of the EA. So many pending or open orders are crowded within a narrow price territory,
if the profit target is rather small.
To sum: one and only one position - running or pending - can be open if the option "Maximum Number of Positions" is set to 1.

Thanks


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Mon Feb 18, 2013 6:00 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Thanks for the feedback. Currently is 1 for positions and 1 for pending orders but I think having an extra variable may help.


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Tue Feb 19, 2013 10:40 am 
Offline

Joined: Sun Oct 07, 2012 3:40 am
Posts: 13
I appriciate your response.

Thank you


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Mon Mar 18, 2013 4:36 pm 
Offline

Joined: Sun Oct 07, 2012 3:40 am
Posts: 13
molanisfx wrote:
Thanks for the feedback. Currently is 1 for positions and 1 for pending orders but I think having an extra variable may help.


Hi,

Hope the new release will correct this bug.
Usually, I control my EA's manually , but from time to time I let them autopilot ("Ask manual confirmation" is unchecked).

Today I had an example of 6 opened positions at the same time. Fortunately, They were frofitable, but they could be losers as well and ruin my (live) account.

This feature is very critical, so please make sure it works as intended.

Amy


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Mon Mar 18, 2013 6:33 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The feature works like this : 1 for positions and 1 for pending orders. It is the way it was designed and not a bug. We might add one extra variable to make it 1 for positions and pending orders.
Quote:
I had an example of 6 opened positions at the same time
If you think you should not have 6 positions, I would need to see your strategy and log file to investigate further.


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Wed Mar 20, 2013 8:06 am 
Offline

Joined: Sun Oct 07, 2012 3:40 am
Posts: 13
molanisfx wrote:
The feature works like this : 1 for positions and 1 for pending orders. It is the way it was designed and not a bug. We might add one extra variable to make it 1 for positions and pending orders.
Quote:
I had an example of 6 opened positions at the same time
If you think you should not have 6 positions, I would need to see your strategy and log file to investigate further.


Thanks,

I would like to sent the files to a personal mail rather than on the forum.

Can I have your mail please?


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Wed Mar 20, 2013 8:32 am 
Offline

Joined: Sun Oct 07, 2012 3:40 am
Posts: 13
molanisfx wrote:
The feature works like this : 1 for positions and 1 for pending orders. It is the way it was designed and not a bug. We might add one extra variable to make it 1 for positions and pending orders.
Quote:
I had an example of 6 opened positions at the same time
If you think you should not have 6 positions, I would need to see your strategy and log file to investigate further.


Just to make clear: It's a Tick by Tick EA, not Completed bar. That's because I can't backtest a comleted bar EA.
Is that an explanation?


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Fri Mar 22, 2013 8:40 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Send your files to sales or support at molanis.


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Tue Mar 26, 2013 8:52 am 
Offline

Joined: Fri Jul 27, 2012 12:08 am
Posts: 14
I have the same problem! For example when a price hits a certain point, a pending order gets triggered. When the price retraces a bit and rises again another pending order gets triggered! And this can happen multiple times. And when the first pending order gets filled. The other pending orders should stop! Because we have set "Maximum Number of Positions" to 1!

But they dont stop all pending orders get filled! So the maximum positions are more than 1! Can this be fixed? Because basically pending orders are useless like this if they open more positions than 1.


Top
 Profile  
 
 Post subject: Re: Maximum Number of Positions
PostPosted: Wed Mar 27, 2013 10:30 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
We had a different view when we designed the feature. Yours is really interesting.
The problem with the pending orders is that the ea does not control execution, it is the server. Currently the max number of positions set to 1 prevents to have 2 pending orders, or to open 2 positions with logic in TAs icon (and not with pending order). However if the pending order is executed then a new pending can take its place. Since this is done by the server you could have more than 1 open position.
The only way to have some control would be to review the number of open positions every tick, if it has reached the max, then delete all pending orders. With this option, you can still have some cases (once in a while) were the pending is executed (it can be executed before we get the next tick). It may be worth to include this option in the changes we are making for pending icons.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009