NexusFi: Find Your Edge


Home Menu

 





Divergence detection algorithm


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 6 posts (11 thanks)
    2. looks_two cunparis with 5 posts (0 thanks)
    3. looks_3 max-td with 4 posts (4 thanks)
    4. looks_4 shodson with 3 posts (2 thanks)
      Best Posters
    1. looks_one cory with 5 thanks per post
    2. looks_two Fat Tails with 1.8 thanks per post
    3. looks_3 max-td with 1 thanks per post
    4. looks_4 shodson with 0.7 thanks per post
    1. trending_up 24,968 views
    2. thumb_up 24 thanks given
    3. group 7 followers
    1. forum 24 posts
    2. attach_file 9 attachments




 
Search this Thread

Divergence detection algorithm

  #21 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

folks,
great that we initiate good activity + an interesting topic here
but i would recommend to open a seperat thread for a divergence trading-discusion.
this is started to be a programming-thread.

cunparis first goal here was to code an indicator / algorithm for to give us a heads-up-diver-alert i think.

max-td
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Tao te Trade: way of the WLD
23 thanks
Diary of a simple price action trader
22 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 thanks
  #22 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

Thank you for the comments. The chart also shows that markets are assymetric, fear and greed do not create the same feedback patterns. In the stock market topping patterns take longer time than bottoming patterns. It is not unusual to see double or triple tops, but rarely you will notice a double bottom with low volatility.

I agree that MACD signals work better with a zero line cross and when volatility is high, so it might give you an edge for stock index bottoms or commodity tops. These are U-class peaks and troughs and not similar to the moderate S-class peaks and troughs.

So to apply a MACD divergence indicator, you might first need to qualify the type of market. Apply it to a high volume climax move and it might work, apply it to a wedge, and you will get a quadruple divergence, which is a failed triple and failed double divergence.

The problem of the divergence is that it only measures the peak (trough) behaviour, but not the trendline side of the price action. If you have an ascending triangle, on the peakside it creates a divergence, on the trendline side it is a continuation pattern. How would you qualify this?



shodson View Post
I attached an updated chart with notes...

Also, reversals often can have targets 2-6x larger than stops so you don't need to be right more than 50% of the time.


Reply With Quote
  #23 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Sorry, read your post only afterwards, yep we can move this to a new thread. I'm happy to see that shodson has a different view than I have. This can be exploited.


max-td View Post
folks,
great that we initiate good activity + an interesting topic here
but i would recommend to open a seperat thread for a divergence trading-discusion.
this is started to be a programming-thread.

cunparis first goal here was to code an indicator / algorithm for to give us a heads-up-diver-alert i think.


Reply With Quote
  #24 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


Fat Tails View Post
Most trading systems based on divergences have a negative expectancy. The left chart is a good example. MACD produced a divergence, not because the trend slowed down, but because of the Baskerville effect: a moving average also barks if something drops out at the beginning of the period.

Hi there . Two things:
  1. A typical MACD is made of EMAs. Nothing "drops out" of an IIR filter.
  2. The Baskerville effect - Wikipedia, the free encyclopedia is related to psychological stress

Thanks.

Reply With Quote
  #25 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093


max-td View Post
folks,
great that we initiate good activity + an interesting topic here
but i would recommend to open a seperat thread for a divergence trading-discusion.
this is started to be a programming-thread.

cunparis first goal here was to code an indicator / algorithm for to give us a heads-up-diver-alert i think.

Yes I was thinking the same. I like divergences and use them in my trading but they have to be taken in context. So it can be a really lengthy discussion, interesting nonetheless.

I'm really interested in the algorithm. This is one thing I've never been able to automate. Which btw, when I say automation I'm not talking about an automated strategy but rather having visual or audio alerts of divergence so that I can inspect it and decide what to do.

I haven't had time to study all the examples in depth but will get to that soon. The MT4 indicator looks the most promising but I don't know MT4's programming language and it looks a bit complicated.

I may continue my current approach, which is to brute force cover all the possible patterns between two data series. for 3 bars it's easy and a lot of the divergences I'm looking for a re 3-5 bars.

Follow me on Twitter Started this thread Reply With Quote




Last Updated on April 29, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts