Pls help, Why does this code not open a single trade in 20 years of back testing?

 
extern double PB1=104.000; // Buy price of Phase 1
extern double OS1=0.01; // Order size of Phase 1
extern double TP1=100; // Take Profit of Phase 1
extern double PBDip1=100; // Dip Level for new buy in Phase 1
extern double CL=10/100; // Cut Loss level

extern double PB2=103.000; // Buy price of Phase 2
extern double OS2=0.01; // Order size of Phase 2
extern double TP2=100; // Take Profit of Phase 2
extern double PBDip2=100; // Dip Level for new buy in Phase 2

extern double PB3=102.000; // Buy price of Phase 3
extern double OS3=0.01; // Order size of Phase 3
extern double TP3=100; // Take Profit of Phase 3
extern double PBDip3=100; // Dip Level for new buy in Phase 3
  int start()
   {
   bool OrderResult;
    while(PB1>Ask)
      {
      if (Ask<(PB1-PBDip1))
        {break;}
        else
         {for (int x=0; x <= OrdersTotal(); x++)
         {
          OrderResult=OrderSelect(x,SELECT_BY_POS,MODE_TRADES);
            if ((PB1-PBDip1) <= OrderOpenPrice() && OrderOpenPrice() <= PB1)
            {
            continue;
            }
         else
            {OrderResult=OrderSend (Symbol(),OP_BUY,OS1,Ask*Point,Ask,50*Point,0,Ask+TP1*Point);
               continue;
            }
         }
         }
      
   return 0;
      }
     return 0;
   }
   
Basic Principles - Trading Operations - MetaTrader 5 Help
Basic Principles - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
Before you proceed to study the trade functions of the platform, you must have a clear understanding of the basic terms: order, deal and position...
 
Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.
 
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. while(PB1>Ask) 
    If you enter this loop, nothing ever changes, loops forever, and the tester stops
 
William Roeder:
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. If you enter this loop, nothing ever changes, loops forever, and the tester stops

1. Edited the post, thanks

2. wouldnt the next tick be lower and PB1 would become lower than Ask?

Reason: