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 12:31 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Two (2) Different Close Conditions
PostPosted: Tue May 01, 2012 6:45 pm 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
Hello Support,

I've taken two EAs and integrated them into one. The new EA executes two different types of trades, with two different sets of conditions as seen below in the diagram:

Image

The problem is that I need to be able to close out each type of trade using two different Close Conditions. I'm not exactly sure about how to do that. As you can see, the CL is triggered based on one MQL block (the reverse is true for the CS side). The existing CL closes the trade that gets triggered by the first set of MQL and TA+ blocks. However, I need another CL to close the second set of MQL blocks that trigger the second type of trade this EA produces (the reverse is true for the CS side).

Is there any way to design the EA so that each CL, or CS, points to a specific trade type? Otherwise, I've got one CL closes ALL Long trade types, and one CS closing ALL Short trade types, which is not the way the EA is supposed to work. I need each trade type to have its own CL, or CS condition.

Thanks!
cfx


Attachments:
EA_Saturn_V1__M1_MTF.mol [25.99 KiB]
Downloaded 384 times
Top
 Profile  
 
 Post subject: Re: Two (2) Different Close Conditions
PostPosted: Wed May 02, 2012 10:43 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The only way to do it is using two different magic numbers within the same ea. The builder is designed to have one magic number for short and one for long. It's not designed to have one for each trading condition.
You can do it if you modify the code since you are an advanced user.
You need to track how the magic number works - sometimes is in the function call, others within the function


Top
 Profile  
 
 Post subject: Re: Two (2) Different Close Conditions
PostPosted: Thu May 03, 2012 11:11 am 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
Is it possible to get this added to the product enhancement matrix?

Most consistently profitable full-time manual traders, deploy more than one branch of trade logic because the type of market condition that works with one branch, may not work with another. Essentially, you need a minimum of two (2) branches to handle vertical and horizontal market conditions - each one producing its own trade signal.

The great thing about Molanis, is that you can integrate all trade signals into a single automated process - that's good. But, not having the ability to specify which trade type gets closed within an EA that contains multiple trade signals, pretty much defeats the purpose of the EA design. That changes the logic of the EA. Being able to control how your trades get closed, seems like a fairly basic assumption.

Imagine for a moment the flip-side of this scenario: If you use Molanis, you will not be able to control how you open trades, but you will be able to control how you close each trade. Clearly, such a statement makes little sense, yet that's the exact same thing as being able to control the opening without being able to control the closing. Not being able to control how you open trades, would be considered by many as being fairly dysfunctional - not much use at all. The same holds true for not being able to control how you close trades.

Logically, if you can use Molanis to control how you open a trade, you should be able to control how you close that same trade using the same tool, without bailing-out into manual edits of the MQL.

Please, kindly consider this as a necessary component to underlying functionality of Molanis Strategy Builder, by adding this capability to the product as an enhancement.

Thank you!
cfx

P.S. The only work-around that I can envision, would be opening a trading account for each trade signal generated by the trading system. That would entail breaking-up each trade signal into its own unique EA, and then divide the total available equity (that would normally be used in one account) across X number of accounts, where X = the number of EAs generating a trade signal.

Using the same logic to suppress trade signals that should not get triggered when running them within the same EA, should have the same net/net effect on the account balance after each trade, excluding the minor negative effects of the differential in slippage across X number of simultaneously running accounts.

However, using one account and one fully integrated EA, is a much more tidy (compact) solution with far fewer moving parts. Anyway, at least the multiple account/multiple EA path provides some kind of doable work-around.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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:  
Powered by Molanis © 2009