Hello, I originally was just going to ask a question but since I have the auto fibonacci script I included it. My question is can anyone add a MTF script to this? I have been trying but no success. One of the strats I do is mark off the highs and lows of a stock on the weekly timeframe using the fib retracement tool on ToS. What I am trying to accomplish is to have a fibonacci script that pulls the weekly highs and lows automatically to a lower timeframe like the 30m or 5m? Thank you
Code:
########
def open = open(period = agg);
def high = high(period = agg);
def low = low(period = agg);
def close = close(period = agg);
input length = 1000;
def DayHigh = HighestAll(high);
def DayLow = LowestAll(low);
plot Dh = DayHigh;
plot Dl = DayLow;
def hi = GetMaxValueOffset(high);
def lo = GetMinValueOffset(low);
#def o = open(period = agg);
def hitime = GetMaxValueOffset(DayHigh , length);
def lotime = GetMinValueOffset(DayLow , length);
def updown = if hitime >= lotime then 1 else 0;
def ud23 = If ( updown, 0.236, (1 - 0.236));
def ud38 = If ( updown, 0.382, (1 - 0.382));
def ud61 = If ( updown, 0.618, (1 - 0.618));
def ud78 = If ( updown, 0.764, (1 - 0.764));
plot uFib50 = (DayHigh - DayLow) / 2 + DayLow;
plot uFib23 = (DayHigh - DayLow) * ud23 + DayLow;
plot uFib382 = (DayHigh - DayLow) * ud38 + DayLow;
plot uFib618 = (DayHigh - DayLow) * ud61 + DayLow;
plot uFib764 = (DayHigh - DayLow) * ud78 + DayLow;