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 2:59 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Maximum positions opened
PostPosted: Mon Sep 09, 2013 5:59 am 
Offline

Joined: Wed Sep 04, 2013 10:48 pm
Posts: 1
I currently have 3 different sets of conditions to open a buy order. All of these conditions are attached to a separate BUY icon using the AND function. When 1 of these sets are triggered the ea opens 3 positions. I would like the ea to open 1 position for the first set of buy conditions. If and when the 2nd or 3rd set of conditions are triggered I would like to ea to open another position. Total max 3 positions 1 per set of conditions.

I have tried setting total maximum positions to 1 - outcome 1 order is opened not allowing any other triggers to open a buy order.

I have tried setting total maximum positions to 3. Outcome 3 positions are opened on either condition 1, 2 or 3.

I am not using pending orders

Is there something I'm missing in the ea settings. Feedback much appreciated.


Top
 Profile  
 
 Post subject: Re: Maximum positions opened
PostPosted: Mon Sep 09, 2013 4:14 pm 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
The max number of opened position is per pair per EA - you need to understand that your trade triggers (TA icons with the AND) will open a position every time they are true. In your case it seems that you get a tick (or a new bar) and trigger 1 is true so it opens a position, in the next tick trigger 1 is still true and opens a second position... and in those 2 ticks your other triggers are false. So trigger 1 opens another position and by the time trigger 2 is true you already have 3 positions so it will not open another position.
If you want each trigger to open one position you need to build trading conditions that are independent and do not overlap; and use more complex triggers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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