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

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Simple Moving Average Strategy
PostPosted: Fri Jan 01, 2010 1:33 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
This Strategy was created with educational purposes. Do not use in real trading.

Simple Moving Average Strategy
Two moving averages can be used to create a forex strategy with these rules:

•Buy when the short period (9) moving average is above the long period (18) moving average
•Sell when the long period (18) moving average is above the short period moving (9) average

Molanis Strategy Builder Parameters
MicroAccount
Trade on completed bars
email Mode ON - EA sends emails with trading information. This option requires that you set up MetaTrader email (On MT4 Go to Tools - Options - email)
Max number of positions 2. The EA opens up to 2 long (or short) positions at the same time.
Reward Risk Ratio ON and Reward Risk Ratio Value = 3. This money management option changes the Stop Loss using the following equation: Take Profit / Stop Loss = 3.


Attachments:
File comment: Strategy File
Molanis_MA.mol [6.4 KiB]
Downloaded 879 times
Top
 Profile  
 
 Post subject: Re: Simple Moving Average Strategy
PostPosted: Fri Feb 12, 2010 11:24 pm 
Offline

Joined: Wed Feb 10, 2010 4:23 am
Posts: 5
Hi Molanis,

I have created my MA strategy,with just two periods as per the tutorial.So as it stand, my ea opens a long trade when my fast period crosses above the slow period and opens a sell trade when the fast period crosses below the slow period.
Thats all fine and good-however I want the ea to close both long and short when they cross a THIRD MA period which is a value of 9, between the other 2.
How do i do this?

Example:
So far: EA opens long position when 9 crosses above 18
EA opens short position when 9 crosses below 18.

But I want: Long position to close when 9 crosses below 12 (third MA period)
Short position to close when 9 crosses above 12 (third MA period)

In a nutshell, the strategy opens buy/sell positions based on 2 ma cross only(9 and 18)
-But closes the positions based on the 9 ma crossing a third ma (period 12)

I have enclosed attachment-is this right or wrong?
I suspect wrong..

Hope you understand?
kind regards
rickyc


Attachments:
3ma Molanis.gif
3ma Molanis.gif [ 25.92 KiB | Viewed 6109 times ]
Top
 Profile  
 
 Post subject: Re: Simple Moving Average Strategy
PostPosted: Sun Feb 14, 2010 9:05 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Somehow the logic overlaps:
EA opens short position when 9 crosses below 18.
Long position to close when 9 crosses below 12 (third MA period)
Remember that before a short is opened, the system closes all longs. We are in a process or making some changes that will allow this type of strategies. With version 3.12 is not possible unless you create a custom indicator to get the signals that you need.

Molanis Team


Top
 Profile  
 
 Post subject: Re: Simple Moving Average Strategy
PostPosted: Fri Feb 19, 2010 7:19 pm 
Offline

Joined: Wed Feb 10, 2010 4:23 am
Posts: 5
molanisfx wrote:
Somehow the logic overlaps:
EA opens short position when 9 crosses below 18.
Long position to close when 9 crosses below 12 (third MA period)
Remember that before a short is opened, the system closes all longs. We are in a process or making some changes that will allow this type of strategies. With version 3.12 is not possible unless you create a custom indicator to get the signals that you need.

Molanis Team


Hi Molanis,
Glad to hear you are in process of making this possible.
Being able to open trades based on 2 ma cross and close those same orders on a third ma which lies in between the two is very much more profitable,(and quite critical for sustained success) than a simple close, based on the same 2 ma's crossing.
I await the changes so i can build my ma cross using this method.

regards
rickyc


Top
 Profile  
 
 Post subject: Re: Simple Moving Average Strategy
PostPosted: Sun Feb 28, 2010 1:39 am 
Offline

Joined: Thu Feb 25, 2010 8:58 am
Posts: 4
I think this problem can be solved with the CLOSELONG/CLOSESHORT Block, the crossing of the third EMA can be defined using two TA-Blocks with AND, in this "Branch" there, so do I normally.


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:  
cron
Powered by Molanis © 2009