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 7:49 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How connect CloseLong or CloseShort
PostPosted: Mon Feb 08, 2010 4:26 am 
Offline

Joined: Mon Feb 08, 2010 4:23 am
Posts: 1
Hello:

Than'ks for Molanis Software!!.

How Connect CloseLong or CloseShort?

Thank you very much, Jaime.


Top
 Profile  
 
 Post subject: Re: How connect CloseLong or CloseShort
PostPosted: Mon Feb 08, 2010 10:15 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Most of the time you don't need to use CloseLong or CloseShort since every time you want to BUY the system closes all shorts first and before you SELL all longs are closed. If you need to use it just connect them after a TA block.

Molanis Team


Top
 Profile  
 
 Post subject: Re: How connect CloseLong or CloseShort
PostPosted: Mon Feb 08, 2010 11:47 pm 
Offline

Joined: Wed Feb 03, 2010 10:09 pm
Posts: 15
Hi,

Instead of getting the EA to close my long with fixed target, I would like to close it based on TA. Suppose the EA has opened a long using moving average cross, I need to close the long when the moving average cross again in the opposite direction.

How do we code it?

Thank ;) s


Top
 Profile  
 
 Post subject: Re: How connect CloseLong or CloseShort
PostPosted: Tue Feb 09, 2010 9:18 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The strategy builder only closes your position before a BUY (closes shorts) / SELL (closes longs) is executed. So you use one TA for BUY and another TA for SELL
You can look at the example viewtopic.php?f=3&t=8

Molanis Team


Top
 Profile  
 
 Post subject: Re: How connect CloseLong or CloseShort
PostPosted: Tue Feb 09, 2010 9:10 pm 
Offline

Joined: Wed Feb 03, 2010 10:09 pm
Posts: 15
Hi Molanis,

Thanks, it works.


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