Need help with lows and highs

 
Hi,

Can someone please tell me the code to find out the below highs and lows from the entry price.

 

  1. 1st highest (wick / shadow) nearest to the entry. Yellow line.
  2. 2nd highest (wick / shadow) nearest to the entry. Yellow line.
  3. 1st lowest (wick / shadow) nearest to the entry. Yellow line.
  4. 2nd lowest (wick / shadow) nearest to the entry. Yellow line.


d


Thank you

Reason: