@jsauter86
you would need something like this:
check if 2 previous bars is a fractal up/down and if true modify your up down variable otherwise no change.
if change mid level = down+( (up - down)/2)
you have to check if the last fractal is 1 bar or 2 bars check, depends on the indicator you are using