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 Sat May 11, 2024 11:40 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Problem: The second order closes the first order
PostPosted: Thu Dec 29, 2011 5:52 am 
Offline

Joined: Tue Dec 20, 2011 6:03 am
Posts: 7
Hello Prompt! Such a problem. I open at the same time on one condition the two opposite orders (BUY and sat at the price of BID) It turns out that the second order closes the previous order, if it triggers a condition for opening. How to make whatever orders were nezavisemye. but one condition. with respect Artem


Attachments:
File comment: scheme
buy+sell.mol [5.83 KiB]
Downloaded 416 times
File comment: Screen
1.gif
1.gif [ 50.01 KiB | Viewed 5315 times ]
Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Thu Dec 29, 2011 7:16 am 
Offline

Joined: Tue Dec 20, 2011 6:03 am
Posts: 7
Sort of figured Hedge changed from False to True


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Jan 03, 2012 11:36 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
Yes, that is the way to go. If you hedge you can have buy and sell at the same time. However you need to use CL and CS to close the positions. If you do not hedge, the ea closes all shorts before going long and viceversa (so CL and CS are not needed).


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Apr 03, 2012 1:41 pm 
Offline

Joined: Tue Nov 22, 2011 3:28 pm
Posts: 83
So to say that is just me putting CL or CS and does not close over the first order?

I can only add the CL and CS without adding a TA for them? For I will not close the trade early. I want to leave the trade open up as much as he can.

This is something that needs to be changed in programming Molanis. Actually could not close the previous order when opening a new one. This serves to brokers who do not accept hedge.


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Apr 03, 2012 2:31 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
CL and CS are trigger by a TA so you need a TA to tell you when to close the position. Most of the times you will use them when you hedge - but there are times where you are not hedging and you use them i.e. multitime frame, use them as sl in some cases.
Unforunately I do not get the last part of your question.


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Apr 03, 2012 4:47 pm 
Offline

Joined: Tue Nov 22, 2011 3:28 pm
Posts: 83
What I mean is to know when you'll have an update Molanis to straighten out this little problem and leave it as an option for the designer to choose between accepting or not close the first order.


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Apr 03, 2012 6:38 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Not sure what you mean with problem. Please explain.


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Tue Apr 03, 2012 8:31 pm 
Offline

Joined: Tue Nov 22, 2011 3:28 pm
Posts: 83
I mean there will be an update that fixes this problem Molanis closing the first order after opening the first order, without putting CL or CS!


Top
 Profile  
 
 Post subject: Re: Problem: The second order closes the first order
PostPosted: Wed Apr 04, 2012 9:27 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
You may be confussed. There is no problem there.
If you trade, you close your positions with stops (sl and tp), or by using indicators, or when you want to trade in the opposite direction.
with stops (sl and tp): Set them in buy/sell icons
by using indicators: Set them in a TA and use CL/CS
when you want to trade in the opposite direction: If you don't hedge, use TAs connected to BUY/SELL, The ea closes all longs before going short and viceversa (because you don't hedge). If you hedge, you need to use CL/CS otherwise no position will be closed.
What you need to work on is the logic to define when to enter and exit
If you still have issues, create a strategy, post it along a complete description (when to enter/exit), and post them in NEW thread.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 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