displacement on Elliot oscillator?

horserider

Well-known member
VIP
@arod49
Code:
declare lower;

input shortLength = 5;
input longLength = 35;
input displace = 0;

def price = (high + low) / 2;
plot ElliotOsc = Average(price[-displace], shortLength) - Average(price[-displace], longLength);
plot ZeroLine = 0;

ElliotOsc.setPaintingStrategy(PaintingStrategy.HISTOGRAM);
ElliotOsc.SetLineWeight(3);
ElliotOsc.DefineColor("Positive", Color.UPTICK);
ElliotOsc.DefineColor("Negative", Color.DOWNTICK);
ElliotOsc.AssignValueColor(if ElliotOsc > 0 then ElliotOsc.color("Positive") else ElliotOsc.color("Negative"));
ZeroLine.setDefaultColor(getColor(8));
 

Similar threads

Top