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

Strategies are published here.

Moderator: admin

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

Postby Konstantin.Usanov » Fri Jan 28, 2011 12:47 am

Hi Egioras,

As I can see on yours snapshots you are trying to load strategies (dMACD and dMACDext) as indicators, since you shown “Add Indicator” -> “Manage Custom Indicators” dialogs.

This is wrong way to load strategies, please load strategies by corresponded dialogs that are destined for strategies exactly.

For example, “Add Strategy” -> “Manage Custom Strategies” dialogs.

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

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

Postby Konstantin.Usanov » Fri Jan 28, 2011 1:19 am

Hi Caalador,

Please note, the limit/stop part of the strategy applies to market price (price movement), not for P/L or to the Gross P/L.

Since, in this case, we are talking about conditional orders please take a look at next useful information:

There are three kinds of a conditional order:

Entry
Used for opening a position when the market price reaches the price specified by the trader. Can be either Entry Stop or Entry Limit. The Entry Stop order is the one which is placed at a less-favorable price than the current market price (higher price if buying, lower if selling). The Entry Limit order is the one which is placed at a better price than the market price (lower price if buying, higher if selling).

Stop
Used for closing a previously opened position when the market price reaches the price specified by the trader. The stop order is used for preventing further losses incurred on the position.

Limit
Used for closing a previously opened position when the market price reaches the price specified by the trader. The limit order is used for locking in profit.

Stop and Entry Stop orders are always executed in full amount at the best available price. Limit and Entry Limit orders are always executed at the price specified by the trader. If the price is unavailable, such orders will wait until the market reaches the specified price again. With Limit and Entry Limit orders, partial fills may occur.

Note: If the trader places two opposite entry orders and hedging is not allowed on the account, the execution of one order will open a position and the execution of the other order will fully or partially close this position.


I hope, it will help you.

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

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

Postby Caalador » Fri Jan 28, 2011 3:17 pm

ah yeah, ok so I shouldn't multiply my stop or limit by the lot size, understood :)
Caalador
 
Posts: 20
Joined: Tue Nov 23, 2010 12:03 am

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

Postby PipGrabber » Sun Feb 20, 2011 7:43 pm

mikes2010 wrote:Hi,

When I try to backtest this strategy, I get the following error:

[string "dMACDext.lua"] 150 : attempt to index a nil value

How can I fxi this issue?

Thanks
Mike


I'm having the same problem at EUR/USD. Is there a fix to this? Only setting the basic properties and leaving the extended options as is. But its giving me the error above too. :cry:
User avatar
PipGrabber
 
Posts: 46
Joined: Fri Jan 21, 2011 9:22 am

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

Postby Konstantin.Usanov » Tue Feb 22, 2011 1:59 am

Hi PipGrabber!

To fix this issue try to manually install the strategy.

Do not load it’s by Trading Station via “Manage Custom Strategies” -> “Load”.
If you already did it, please remove loaded strategy (via “Manage Custom Strategies” -> “Remove”) before next steps.

Just assume, you have instance Trading Station on
“C:\Program Files\Candleworks\FXTS2” folder, so you need to put downloaded strategy to
C:\Program Files\Candleworks\FXTS2\strategies\Custom” folder manually.

The best way to do this is directly select
“C:\Program Files\Candleworks\FXTS2\strategies\Custom” folder
when you start downloads strategy from FXCodeBase.

Then, just restart Trading Station and use custom strategy as you want.

I hope this will helpful for you.

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

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

Postby d10gen3 » Mon Feb 28, 2011 12:17 pm

Hello, I have been looking fora way to limit the orders on this strategy. What I mean is the following:
I would like to be able to tell the strategy:
Keep a maximum of 1 or 2 or 3 positions open and each one of a maximum of 1 or 2 or 3 lots.

I would like the strategy to have 1 open short of 1 lot and until that trade is not closed, the strategy should not try to short again.

Is that possible? Any help will be welcome, by the way this strategy is so far the one who has had the best results for me.
d10gen3
 
Posts: 11
Joined: Wed Jan 26, 2011 8:18 pm

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

Postby Konstantin.Usanov » Tue Mar 01, 2011 7:36 am

Hi d10gen3!

The strategy was primary designed to produce trading operations due to all divergence occurrences, since is not benefit to lost or miss some of divergence signals for trading.

If you are real looking correct way to limit the produced orders (however, orders always follow divergence detection and this detections are not so much, basically, so and orders will be produced no so much), please use all available facilities:
Margin care”,
Profit/Loss care” or
Risk management” (full functional).

For additional information there is general algorithm of dMACDext strategy:

1. Strategy detects divergence (True or Hide).
2. Depends on trend movement strategy decides to buy or to sell.
3. Trade operation is beginning.
4. It does begin from checks.
5. First check is for Margin. (Margin of account compare with given value in parameters)
6. If margin of account (current value at this moment, moment of trade) less or equal
value from parameters then trade is not process.
7. Second check is P/L care. (GrossPL of account compare with given values in parameters)
8. If GrossPL of account (current value at this moment, moment of trade) more or less then corresponded values from parameters then trade is not process.
9. Otherwise, trade is continuing and True market order opens the position at currently available market rate for buy or sell direction depends on detected trend movement.
10. If risk management is using then Limit or Stop orders will be also opened at this moment.

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

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

Postby d10gen3 » Tue Mar 01, 2011 6:51 pm

Well, I wanted the limit that i asked for three baic reasons:

1. I tested the other day the strategy with a 65 USD account, with a 15 minute candle chart on EURUSD. I had Margin care at 85%, trailing stop 30 pips behind, following every 10 pips. The script goes short once, EURUSD goes up 10 pips and comes back, when i'm loosing 5 pips again, another signal is reached (that's like 10 minutes after first short), the script goes short again, but the market retracts another 10 pips and i get a margin call which closes both shorts, i end up loosing 25 pips. But the market reacts and EURUSD falls 90 pips.
If the strategy wouldn't have opened the second short, i would have ended with +70 pips (that's where my TP was).

2. If the market gets flat (from 15:30 to 19:00 Central Daylight Time), the strategy usually receives a lot of signals to go short or long, even if i set it up to use Volume as price stream. When the market wakes up again, sometimes it goes in the opposite direction. With a limit to the number of positions open, you can prevent a margin call due to % of used account.

3. Finally, the idea of autotrading is to create a strategy that operates the way i would do it even when i'm sleeping, well, i would never use more than 50% of my account resources, that means i always want to have at least 50% of my account as backup, but the stratefy does not take that into consideration.

Well, thanks very much for taking the time to answer to my post. If I had the knowledge, i would implement those changes by myself, but i tried and i didn't succeed, so, if someone else is interested in helping me, that will be much appreciated.
d10gen3
 
Posts: 11
Joined: Wed Jan 26, 2011 8:18 pm

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

Postby Caalador » Tue Mar 08, 2011 1:45 pm

Hi guys,

so, I tested this strategy for about 3 months, automated. I've tried it on 1 hour and 1 day charts mostly. I've learned that it's generally more effective to have a higher stoploss than limit, by at least a factor 3.

Overall all accounts that I left fully automated ran into losses at some point. However, I've used an hourly one semi-manually where I get an email when the strategy opens a position. I then disable the strategy and manually finish the trade with set limits of 35 pips profit, 120 pips loss. I sometimes open secondary positions if the trade goes into -50 pips and move the stoploss down.

I started with a 50$ account, and it's at 209$ now, and has never used more than 50% margin.

Also, I've tested it without any settings for stop/loss or margin, and I've noticed it will just keep opening positions continuously. When the general trend is in a certain direction, this will mean it will open more positions in that direction, and never close them because it won't open positions in the opposite direction. In other words if you monitor it well, you can get huge profits, but the risk is also pretty severe.

Konstantin, have you looked at the Ichimoku as a possible basis for your strategy, instead of MACD? I've been using that together with your strategy and it is getting me more profitable results.

Possibly, is there some way you could make your strategy so that it can validate against 2 charts? For example:

IF trend on daily chart is down AND trend of hourly chart is down: OPEN SHORT
That way you could trade hourly charts, but never go against the daily trends.

Hope my feedback is usable :)
Caalador
 
Posts: 20
Joined: Tue Nov 23, 2010 12:03 am

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

Postby Konstantin.Usanov » Wed Mar 09, 2011 7:55 am

Hi Caalador,

Thanks a lot for your feedback, it’s real usable.

About
possible basis for your strategy

please take a look at:

Divergence Explorer strategy
http://www.fxcodebase.com/code/viewtopic.php?f=31&t=2841&p=6496

It’s the same strategy as dMACDext but can use different indicators (not only MACD) for divergence calculation and trading.

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

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 9 guests