coding candle retracements

 

Hello fellow coders,

I am looking for ways to code price action within a candle. for instance writing code for when a candle has retraced more than 50% from its high. A point in the right direction would be much appreciated. Thank you

 
Adam Woods: has retraced more than 50% from its high.
  1. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

  2. Learn to code.
    double h   = High[0], o = Open[0],
           ret = (h + o) / 2; // Or general: ret = o + (h - o) * percent/100 
    if(Bid < ret) retraced();
    I suggest you add an additional filter such as the high must be at least ½ × ATR since one tick up and one tick down is 100% retrace from the high.
 
Thats all I was looking for a point in the right direction. I can code I just needed a mind jog to get me on the right path thank you
Reason: