How to open a new buy order after 20 pips away from previous order

 
#include<Trade\Trade.mqh>

CTrade trade;

void OnTick()
  {
   double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
   
   datetime time=TimeLocal();
   string HoursAndMinutes = TimeToString(time,TIME_MINUTES);
   
   if ((PositionsTotal()==0) && (StringSubstr(HoursAndMinutes,0,5)=="00:00")) 
   {
      ticket_11 = trade.Buy(0.10,NULL,Ask,0,(Ask+20 * _Point),NULL);
   }
   
   Comment(HoursAndMinutes);
  }
1. At the moment my code is opening a buy order at 00:00 hours and closing the order after reaches profit 20 pips.
2. I wanted to open a buy order if the current buy order is minus 20 pips.
3. Example as below :-

- open a buy order (EURUSD price 1.11980) at 00:00 hours
- the price now become 1.11780 and I want the code to open a new buy order (this is the part that I stuck to code now)
- the price now become 1.11580 and I want the code to open a new buy order (this is the part that I stuck to code now)
- the price now become 1.11380 and I want the code to open a new buy order (this is the part that I stuck to code now)

Appreciate assistance from the people in this forum.
 
monasa:I want … Appreciate assistance
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using CODE button) and state the nature of your problem.
          No free help
          urgent help.