How to place Fibonacci based on entry

 
How would I go about coding Fibonacci placement based on my entry point and taking it to the previous low or high in the market.
 
Highest and lowest indicators, based off previous time periods. 
Reason: