Classic MACD strategy

Strategies are published here.

Moderator: admin

Classic MACD strategy

Postby vstrelnikov » Thu Oct 21, 2010 11:51 am

There is a classic MACD strategy which works on MACD indicator.

The strategy enters long when MACD line crosses over SIGNAL line in negative chart area below specified 'open level'. The strategy enters short in opposite conditions (MACD crosses under SIGNAL in positive area).

You can use this strategy by itself or you can use it as a basic sample to create you own strategies.

Options:

1) The strategy can confirm trend with help of Moving Average indicator, you can easily switch this behavior with 'Confirm trend with MA' parameter.

2) The strategy can show signals (alerts, sounds (including recurrent), emails) as well as can trade. By default trading is disabled. To let the strategy trade please go to the "Trading Parameters" and switch "AllowTrading" parameter to "On".

3) In trading parameters you can also switch on and configure stop and limit orders.

4) Strategy work as with FIFO as well as non-FIFO accounts. In case of FIFO account NetStop and NetLimit orders will be created.

MACD Sample.png


Download strategy:
Attachments
MACD Sample.lua
(12.02 KiB) Downloaded 1094 times
vstrelnikov
 
Posts: 59
Joined: Tue Jul 06, 2010 8:31 pm

Re: Classic MACD strategy

Postby alepan72 » Fri Dec 17, 2010 5:54 am

vstrelnikov wrote:The strategy enters long when MACD line crosses over SIGNAL line in negative chart area below specified 'open level'. The strategy enters short in opposite conditions (MACD crosses under SIGNAL in positive area).


Hello,
Can you explain me please what exactly means "open level" and close level" parameters. My english is nt so good and if it's possible I prefer an image example...
Thanx and sorry for my english... :oops:
Image
User avatar
alepan72
 
Posts: 59
Joined: Wed Oct 27, 2010 4:19 am

Re: Classic MACD strategy

Postby drvery » Wed Dec 29, 2010 10:23 am

Thank you so much for the strategy. I find it a great tool to design an approach for me. I have one question. If I am to use the strategy to autotrade, what does 'trade size = 1 lots" mean? 10,000 or 100,000. Thank you.
drvery
 
Posts: 2
Joined: Wed Dec 29, 2010 10:19 am

Re: Classic MACD strategy

Postby Apprentice » Wed Dec 29, 2010 10:37 am

Lot is The standard unit size of a transaction.

Lot size varies from broker to broker.
It differs in different types of accounts.

For Micro it is usually $ 1000 and for Mini $ 10,000 and $ 100.000 for Standard.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Classic MACD strategy

Postby drvery » Wed Dec 29, 2010 11:02 am

The minimum trade size for me is 1 for gold and 10000 for forex, however, when i do the back testing, it showed that next to the arrows indicating buy/selling... SELL 10000K @ ....

WHy 10000k (the K definitely stands for 000) is this just a typo from the strategy? Please advise!
drvery
 
Posts: 2
Joined: Wed Dec 29, 2010 10:19 am

Re: Classic MACD strategy

Postby AliRaza08 » Wed Apr 08, 2015 7:48 am

I find it a great tool to design an approach for me. I have one question. If I am to use the strategy to autotrade, what does 'trade size = 1 lots" mean? 10,000 or 100,000. Thank you.
Kashmiri Butt
AliRaza08
 
Posts: 2
Joined: Wed Apr 08, 2015 6:57 am

Re: Classic MACD strategy

Postby Apprentice » Sun Apr 12, 2015 10:25 am

Lots size is determined by your account type.
For me one lot is equivalent of 1000 US Dollar.
http://www.fxcm.com/markets/resources/v ... -is-a-lot/
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Classic MACD strategy

Postby nweiss » Mon Apr 13, 2015 6:04 am

Could you add pls that I could change the time frame of the Moving average and also add an Ema as conformation !

Thanks
nweiss
 
Posts: 27
Joined: Wed Jun 11, 2014 5:18 pm

Re: Classic MACD strategy

Postby cnikitopoulos94 » Sun Sep 13, 2015 3:31 am

Hey Apprentice,

Is there a way to change the settings where no matter where the macd and signal line crosses over it still does transactions? I would greatly appreciate it if it were an option more then just a solid command.. The reason its important is because sometimes even when macd does do a cross it might range and not give the macd enough time to cross to the other section.

Thanks for taking the time to look at my post.
cnikitopoulos94
 
Posts: 50
Joined: Sat Sep 12, 2015 8:10 am

Re: Classic MACD strategy

Postby Apprentice » Mon Sep 21, 2015 5:32 am

Try updated version.
Set MACD Open/Close Level to zero.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests