Cwparker23
Member
Link to the indicator: https://tos.mx/ly0CPE2
watch the video for more information
watch the video for more information
Ruby:
################################################################
################################
#Cwparker23#
################################
input length = 12;
def H = high;
def C = close;
def L = low;
def O = OPEN;
input Fib1 = .786;
input Fib2 = .214;
def _highInPeriod1 = Highest(h ,length);
plot Channel_High = if _highInPeriod1 <= _highInPeriod1[1] then _highInPeriod1 else double.NaN ;
Channel_High.SetDefaultColor(CreateColor(109, 42, 28));
Channel_High.SetLineWeight(3);
def _lowInPeriod1 = Lowest(l ,length);
plot Channel_low = if _lowInPeriod1 >= _lowInPeriod1[1] then _lowInPeriod1 else double.NaN;
Channel_low.SetDefaultColor(CreateColor(76, 133, 78));
Channel_low.SetLineWeight(3);
plot mid = (_highInPeriod1 + _lowInPeriod1)/2;
mid.SetLineWeight(3);
mid.SetDefaultColor(Color.vIOLET);
def range = (_highInPeriod1 - _lowInPeriod1);
input Hide_fibs = no;
PLOT Fib1_ = _lowInPeriod1 + (range*Fib1);
Fib1_.SetDefaultColor(createColor(132, 76, 130));
Fib1_.SetHiding(Hide_fibs);
PLOT Fib2_ = _lowInPeriod1 + (range*Fib2);
Fib2_ .SetDefaultColor(createColor(132, 76, 130));
Fib2_ .SetHiding(Hide_fibs);
def buying = (close - low) ;
def selling = (high - close) ;
DEF B = BUYing > SELLing;
DEF S = SELLing > BUYing;
DEF CU = c > c[1];
DEF CD = c < c[1];
PLOT SELLing_pressure = IF CU AND S THEN h ELSE DOuble.NaN ;
PLOT BUYing_pressure = IF CD AND B THEN l ELSE DOuble.NaN ;
SELLing_pressure.SetPaintingStrategy(PaintingStrategy.POINTS);
SELLing_pressure.SetDefaultColor(Color.mAGENTA );
SELLing_pressure.setlineWeight(5);
BUYing_pressure.SetPaintingStrategy(PaintingStrategy.POINTS);
BUYing_pressure.SetDefaultColor(Color.cyan);
BUYing_pressure.setlineWeight(5);
Last edited by a moderator: