Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
{Phasor addition for 3 bar averaging)}
I2 = I1 - JQ;
Q2 = Q1 + jI;
{Smooth the I and Q components before applying the discriminator}
I2 = .2 * I2 + .8 * I2[1];
Q2 = .2 * Q2 + .8 * Q2[1];
{Homodyne Discriminator}
Re = I2 * I2[1] + Q2 * Q2[1];
Im = I2 * Q2[1] - Q2 * I2[1];
Re = .2 * Re + .8 * Re[1];
Im = .2 * Im + .8 * Im[1];
If Im <> 0 and Re <> 0 then Period = 360 / ArcTangent (Im/Re);
If Period > 1.5 * Period[1] then Period = 1.5 * Period[1];
If Period < .67 * Period[1] then Period = .67 * Period[1];
If Period < 6 then Period = 6;
If Period > 50 then Period = 50;
Period = .2 * Period + .8 * Period[1];
SmoothPeriod = .33 * Period + .67 * SmoothPeriod[1];
I am not sure what exactly you mean with " How can those support and resistance line wont appear at the same time ?", but in general when you display plots at the same value they will overlap. One idea could be to use a different color in that situation or to slightly shift one of the values up or down, so you can easily spot the two values at the same price.
The lines are plotting based off the lower indicator action. One set of dots appears when the blue crosses over the red and another set appear when the red crosses over the blue. Not sure if this would work ( I'm at work and can't verify the code, but perhaps try this: