(NEW) Introduce dMACD strategy (Divergence on MACD Signals)

Strategies are published here.

Moderator: admin

(NEW) Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Mon Aug 30, 2010 6:27 am

Hi!

I’d like to introduce dMACD strategy (Divergence on MACD Signals).
Base calculation approach (relative to divergence) was taken from “MACD Divergence indicator and signal” (http://fxcodebase.com/code/viewtopic.php?f=17&t=869).

My primary goal was to research for trading on divergence signals (all types: True and Hide) with complete risk management (by limit/stop orders) and implement the auto trading with full back testing of dMACD strategy.

backtest_dMACD.JPG
dMACD

dMACD.lua
dMACD strategy
(8.63 KiB) Downloaded 3474 times
Note: improved version exists with full functional Risk Management and more (look at post, Tue Dec 14, 2010 http://www.fxcodebase.com/code/viewtopic.php?f=31&t=1985&p=6747#p6747)
dMACD.lua.rc
dMACD resources (this file is required for strategy, put it's to the same place (local folder) with strategy)
(746 Bytes) Downloaded 2516 times
Note: improved version exists with full functional Risk Management and more (look at post, Tue Dec 14, 2010 http://www.fxcodebase.com/code/viewtopic.php?f=31&t=1985&p=6747#p6747)

...

Note. Please do not use the strategy on live accounts unless you carefully checked and implicitly decided that the strategy meets your trading goals. Please do not forget that you are solely and fully responsible for all the trades made by the strategy exactly like for the trades executed manually.
Last edited by Konstantin.Usanov on Tue Dec 14, 2010 1:58 am, edited 10 times in total.
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Mon Aug 30, 2010 6:32 am

..., the dMACD is friendly customized (by tuning strategy properties) and can be used not only for auto trading features but also as signal of True/Hide divergence.
dMACD_properties.JPG
dMACD properties


Next picture discovers the divergence at glance as it’s implemented by the dMACD strategy.
Divergences at work.JPG
Divergences at work


Please also take a look at result of back testing for dMACD strategy.
Backtesting result.zip
Backtesting results
(391.18 KiB) Downloaded 2205 times


My conclusion: trading on divergence signals more profitable when used Hidden divergence as additional signal to True divergence and as well the Risk management taken into account.

I’m open for any questions and discussions.

Thanks!

NB
Currently used symmetric risk management approach, when limit and stop established by the same value (delta).
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby DS0167 » Mon Aug 30, 2010 3:41 pm

Thank you for this huge work :)

One question, do we need to download the indicator before using this strategy ?

FYI, I tried a backtest with the same pair and time frame than you and my results are not as good as yours... any idea ?

Kind regards,
Danielle
DS0167
 
Posts: 86
Joined: Mon Aug 09, 2010 2:22 pm

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Mon Aug 30, 2010 11:02 pm

Hi Danielle!
Thanks a lot! :)

You do not need to download the MACD indicator before using dMACD strategy.
The MACD is standard indicator for FXCM Trading Station (FXTS) and may be found at
corresponded folder (for example: “C:\Program Files\Candleworks\FXTS2\indicators\Standard”).

Provided pictures with results of back testing are contain the MACD indicator (at middle) for additional information purposes only, since the dMCAD strategy is based on MACD indicator. In generally, you do not need to attach the MACD indicator to charts for using dMACD strategy.

I have guessed about different results of yours back testing. Perhaps your BACKTEST Properties are different from mine? Please check it’s with next picture.
Backtesting_properties.JPG
Backtesting properties

The “Backtesting_properties.JPG” is also included to “Backtesting result.zip” that is provided at previous posts.
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Tue Aug 31, 2010 5:13 am

Hi!
The dMACD strategy becomes more friendlier and more profitable.

Added choice of one from three MACD indicator’s stream to divergence computation:
MACD or SIGNAL or HISTOGRAM. (new “MACD streams” group of dMACD properties has presented)

I have back tested the new version of dMACD strategy and discovered that with HISTOGRAM stream the new dMACD strategy has more profitable then previous version (was based exactly on MACD stream of MACD indicator).
The MACD stream may be also choose in “MACD streams” group of strategy properties and new dMACD strategy will have the same behaviour as previous version (top message at this post).

Please checkout the new version dMACD strategy
dMACD.lua
dMACD strategy
(9.34 KiB) Downloaded 1918 times

dMACD.lua.rc
dMACD resources (this file is required for strategy, put it's to the same place (local folder) with strategy)
(878 Bytes) Downloaded 1724 times

and latest back testing result.
Backtesting result (new version dMACD).zip
Backtesting result (new version dMACD)
(264.91 KiB) Downloaded 1415 times

Thanks!
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby dagoncho » Sat Sep 04, 2010 6:18 pm

Hi Konstantin,
I can't open .lua files. I've used recommended booster but didn't work.

Regards.
dagoncho
 
Posts: 1
Joined: Thu Sep 02, 2010 9:33 pm

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Mon Sep 06, 2010 12:30 am

Hi dagoncho!
Could you please tell me more about your problem?
All provided .lua files are opening without problems and work fine.

Please follow next simple “check list” for self:

1. Download both files (dMACD.lua and dMACD.lua.rc).

2. Copy dMACD.lua and dMACD.lua.rc files to your “FXCM Trading Station” (FXTS) custom strategy folder, for example: “C:\Program Files\Candleworks\FXTS2\strategies\Custom”.

3. Restart FXTS and log in to FXTS with Demo account.
(if you do not have Demo account, please create Practice Account at FXCM, http://www.fxcm.com/open-free-100k.jsp)

4. Open Marketscope.

5. Add the BACKTEST indicator to a chart.
(to do this, simply select “Add Indicator” on the “Insert” menu of Marketscope and choose the BACKTEST indicator from the list)

6. Open BACKTEST Properties by double-clicking the indicator label.

7. Select “dMACD” as Signal (the first parameter of the BACKTEST properties).

8. Specify all necessary properties for dMACD strategy.
(to do this, you should click the little button with three dots to the right of the selected strategy in the BACKTEST properties)

9. Finish with the settings and close the BACKTEST Properties dialog box by clicking OK, the back testing process will start and you will see the Equity chart at the bottom of the chart window as a result of work of dMACD strategy.

10. That’s all.
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby mmarwaha » Mon Sep 27, 2010 3:11 am

hi,
could you tell me on which time frame this strategy should be best used.
mmarwaha
 
Posts: 2
Joined: Thu Sep 23, 2010 4:51 am

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby Konstantin.Usanov » Mon Sep 27, 2010 6:57 am

Hi!
From my point of view the best time frame is 60 minutes (H1).
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 42
Joined: Mon Aug 30, 2010 3:02 am
Location: Russia, Siberia, Omsk

Re: Introduce dMACD strategy (Divergence on MACD Signals)

Postby robin76 » Thu Sep 30, 2010 4:30 am

Hi, I like this strategy, but I have a problem: it opens more than one position, and when it open a position in the opposite direction, it does'nt work, because it clode the current on, and nothing more.
Can you enter a check to let it open only one position, or a number estabilished in global configuration?
Thanks
robin76
 
Posts: 3
Joined: Wed Sep 29, 2010 4:45 am

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 6 guests