Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 00:43:00 +0000



Post From: Divergence Line Drawing

[2015-11-15 16:41:34]
CustomIndicators - Posts: 126
Futures Operator,

The way this algo identifies swing points, is this. I'll give the example of locked swing points.

Lets say there are 4 candles. 3, 2, 1, and 0.
0 is the live candle.
1 is the last locked candle, etc.

For a Peak:
if 3 < 2 and 2 > 1

For a Valley:
if 3 > 2 and 2 < 1

Do you prefer a different method of identifying swing points?

I'm not at my trading office right now due to it being the weekend, so I can't look at my code to be sure at the moment. I believe the divergences are something like this:

Lets say, we are keeping track of 2 Peaks, and 2 Valleys.
Peak1 is the last locked peak.
Peak2 is the second locked peak back.

Valley1 is the last locked valley
Valley2 is the second locked peak back.



--- Divergences:

Price chart:
if Peak2 > Peak1

Oscillator:
if Peak2 < Peak1

------------------

Price chart:
if Peak2 < Peak1

Oscillator:
if Peak2 > Peak1


Does that make sense? I hope I'm writing this correctly.


For the MACD version, which line would you want to be used for the divergence/convergence lines?

Yes, customization of the arrows/lines for colors and show/hide could be easily put in.

I'm sorry about the miss-draw. The reason for this is that the candles in that area have the same timestamp down to the second. You are using a tiny tick chart, so this will happen. I tried to fix it when I was working on this study. No luck. Perhaps I'll give it another shot one of these days.