1 (edited by ldnfx 2012-06-24 07:43:03)

Topic: Divergence

Is anyone able and willing to convert this indicator?

Thanks,

Post's attachments

CCI_Divergence_V1.1.ex4 11.12 kb, 15 downloads since 2012-06-24 

You don't have the permssions to download the attachments of this post.

Re: Divergence

Just a note - ex4 is machine readable only. Source code is vital.

3 (edited by ldnfx 2012-06-24 11:22:33)

Re: Divergence

footon wrote:

Just a note - ex4 is machine readable only. Source code is vital.

Please find the indicator enclosed.

Post's attachments

CCI_Divergence_V1.1.mq4 11.7 kb, 16 downloads since 2012-06-24 

You don't have the permssions to download the attachments of this post.

Re: Divergence

I have a question - why the indicator uses low prices for finding both bullish and bearish divergence? Using low prices for bullish and high prices for bearish divergence makes more sense to me.

5 (edited by ldnfx 2012-06-24 14:08:34)

Re: Divergence

footon wrote:

I have a question - why the indicator uses low prices for finding both bullish and bearish divergence? Using low prices for bullish and high prices for bearish divergence makes more sense to me.

To be perfectly honest I haven't investigated the exact method for calculating both divergences. For some reason its performance is better than satisfactory.

I am attaching another similar indicator so you may compare them.

Post's attachments

Divergence Petr 1.mq4 64.61 kb, 19 downloads since 2012-06-24 

You don't have the permssions to download the attachments of this post.

Re: Divergence

For some reason its performance is better than satisfactory.

You tell it from a backtest or a manual trading result?

7 (edited by ldnfx 2012-06-24 21:17:53)

Re: Divergence

Manual trading only in this case.
Besides this indicator I would like to introduce a complete trading system with a proven track record but its much more difficult to implement as it involves pair trading and arbitrage. Is it possible to program arbitrage strategy in FSB?

Re: Divergence

Can you confirm 2 bar lag in the CCI indi until signal arrow appears?

For multipair trading, we need to wait until December, then some very interesting stuff should appear.

Re: Divergence

Yes, I confirm that such lag exists.

Re: Divergence

I played around with the code, turned out to be tough for me, but I got one half of the indi working. There's one major issue though - my version complies with the logic found in the source, that is if there was a trough 2 bars back, it finds the trough before that, then gets respective price values, compares the whole lot and gives the signal if necessary. Turns out my indi gives more signals than the MT version. To my observations MT indi should set more signals as well, but I can't say MT indi is the faulty one...

I think I'll finish the other half, whether it's worth posting later is up to you to say, really.

Thanks!

Re: Divergence

Well-well-well, finished up the second half,  signals matched, so I edited the first half, and now everything seems to be in order. Find the indi below.

Post's attachments

CCI Divergence.cs 11.07 kb, 93 downloads since 2012-06-25 

You don't have the permssions to download the attachments of this post.

Re: Divergence

Footon, thank you for the indicator.
I have tested it and in my view this idea has some potential.
However, in order to be succesfull it needs to be combined with other indicators such as price action patterns and maybe some momentum indicators.

I attach the strategy for EURUSD 1H.

Market: EURUSD 1 Hour
Spread in pips: 20.00
Swap Long in pips: 2.00
Swap Short in pips: -2.00
Commission per lot at opening and closing in pips: 0.00
Slippage in pips: 0

Maximum open lots: 1.00
Entry lots: 1.00

Intrabar scanning: Accomplished
Interpolation method: Pessimistic scenario
Ambiguous bars: 0
Tested bars: 13978
Balance: 16604 pips (26604.00 USD)
Minimum account: -536 pips (9464.00 USD)
Maximum drawdown: 3872 pips (3872.00 USD)
Time in position: 19 %

[Strategy Properties]
     A same direction signal - Does nothing
     An opposite direction signal - Does nothing
     Permanent Stop Loss - 500
     Permanent Take Profit - 1100
     Break Even - None

[Opening Point of the Position]
     Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
     CCI Divergence
     [ A ]   Long if bullish divergence
     Smoothing method  -  Exponential
     Base price  -  Open
     CCI period  -  8
     Use previous bar value  -  No

[Opening Logic Condition]
     Accumulation Distribution
     [ A ]   The AD rises
     Use previous bar value  -  Yes

[Opening Logic Condition]
     Vidya Moving Average
     [ A ]   The Vidya Moving Average rises
     Base price  -  Close
     Period  -  2
     Smooth  -  5
     Use previous bar value  -  Yes

[Closing Point of the Position]
     Fractal
     Exit long at an Up Fractal
     Visibility  -  The fractal is visible
     Vertical shift  -  0

Re: Divergence

http://s14.postimage.org/67bapez99/EU_Div.jpg

Re: Divergence

Footon, after numerous backtests and demo trading I may say that the concept is worth further investigation.

Would you be able to have another look at the second indicator (Divergence Petr) ?

Its main strenght against the CCI Divergence is its ability to plot a line which lasts for a couple of bars. It enables to mimic real-time divergence trading more realisticly.

Thanks,

15 (edited by ldnfx 2012-08-22 00:16:19)

Re: Divergence

I have found this video today. It explains the divergence concept for those who are not yet familiar with it.
Divergence Petr indi is able to mimimc this style of trading quite reasonably.

http://www.youtube.com/watch?v=4fcstUyhOZg

It would be great to think about taking this concept to another level and design Multi-timeframe (WTF) divergence indicator.

16 (edited by nquental 2013-07-27 13:51:03)

Re: Divergence

I tried that strategy with my data and EURUSD parameters and got this. Very different!

Post's attachments

test.jpg 131.24 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Divergence

hello footon

iam trying to modify your CCI Divergence to work with candle code but not working , it always failed in compiling , the problem that i cannot inherit from custom indicator 

attached here my trial to modify your code

How to fix it

Thanks in advance

Post's attachments

CC Divergence.cs 11.33 kb, 10 downloads since 2013-11-03 

You don't have the permssions to download the attachments of this post.

Re: Divergence

Very tricky, I have no idea at the moment, sorry.

Re: Divergence

You cannot inherit a class that is not a part of FSB Assembly. This is due to .NET design.

Re: Divergence

Hello
i try to build the cc divergence by merging  cci divergence and candlecode indicator into one but not working

any help to fix the code!!!

regards

Post's attachments

CC Divergence .cs 15.48 kb, 48 downloads since 2013-11-04 

You don't have the permssions to download the attachments of this post.

Re: Divergence

by the way footon
when i looked inside  cci divergence in calculation part , i found 

                        double[] bullishDivergence  = new double[Bars];
            double[] bearishDivergence  = new double[Bars];
            double[] bearishDivergence1  = new double[Bars];

and there is no bullishDivergence1 !!!  is that ok or the indicator missing some bullish divergence setups?


Regards

Re: Divergence

ahmedalhoseny wrote:

by the way footon
when i looked inside  cci divergence in calculation part , i found 

                        double[] bullishDivergence  = new double[Bars];
            double[] bearishDivergence  = new double[Bars];
            double[] bearishDivergence1  = new double[Bars];

and there is no bullishDivergence1 !!!  is that ok or the indicator missing some bullish divergence setups?


Regards

You need to compare it source to figure that out.

Re: Divergence

ahmedalhoseny wrote:

Hello
i try to build the cc divergence by merging  cci divergence and candlecode indicator into one but not working

any help to fix the code!!!

regards

40 Downloads for not working indicator smile !!!!!

Re: Divergence

Here is RSI Divergence "Footon original code" i only made the copy and past job

Post's attachments

RSI Divergence .cs 9.45 kb, 34 downloads since 2013-11-06 

You don't have the permssions to download the attachments of this post.

Re: Divergence

Thanks a lot for this indicator!
It has been showing up consistently in the generator. It's a good sign. I was write when I asked some time ago for more divergence indicators smile