The OnTick function doesn´t seem to update every tick

 
// HelloWorld for MT4GUI
// Lets include the imports file mt4gui.mqh
#include <mt4gui2.mqh>
 
// global Variable
int hwnd = 0;
int buy_check = 0;
int sell_check = 0;
int lot_size_label = 0;
int lot_size = 0;
int SL_label = 0;
int TP_label = 0;
int SL = 0;
int TP = 0;
int execute_button = 0;
 
int OnInit()
  {
   
    int GUIX = 50;
   
   
    hwnd = WindowHandle(Symbol(),Period());
    // Version shall be displayed as comment
    Comment("MT4GUI Version : "+guiVersion());          
    // mark your clients with your apikey - optional - available from version 2.6
    guiVendor("259495BDD3F940996B5FF5475EB0BFFE");
    guiRemoveAll(hwnd);
    buy_check = guiAdd(hwnd,"checkbox",10,100,100,30,"BUY");
    sell_check = guiAdd(hwnd,"checkbox",10,150,100,30,"SELL");
    lot_size_label = guiAdd(hwnd,"label",120,150,50,30,"Lot Size: ");
    lot_size = guiAdd(hwnd,"label",175,150,50,30,"0.01");
    SL_label = guiAdd(hwnd,"label",120,185,30,30,"SL: ");
    TP_label = guiAdd(hwnd,"label",230,185,30,30,"TP: ");
   
    SL = guiAdd(hwnd,"text",148,186,60,20,"Text Field");
    TP = guiAdd(hwnd,"text",258,200,60,20,"Text Field");
    execute_button = guiAdd(hwnd,"button",120,100,100,30,"GO!");
   
    // Every GUI Item returns a handle
  return(0);
  }
 
 
 
 
int OnDeinit()
  {
   // Very important to cleanup and remove all gui items from chart
   guiRemoveAll(hwnd); guiCleanup(hwnd);
   return(0);
  }
 
 
void OnTick()
{

   double riskPerTrade = 0.01;
   double pip = 0.0001;
   double pipValue = 10; //only when the quote is USD
   
   
   
   
   Alert(1);
   double sl = StrToDouble(guiGetText(hwnd,SL));
   double tp = StrToDouble(guiGetText(hwnd, TP));
   double lotSize = (riskPerTrade * AccountEquity()) / (pipValue * sl);
   
   
   
   if (guiIsChecked(hwnd,buy_check) && !guiIsChecked(hwnd,sell_check)){
   
      if (sl < Ask < tp){
            Alert("1");
            guiSetText(hwnd,lot_size,lotSize, 19, "arial");
      } else {
            guiSetText(hwnd,lot_size,"Invalid", 19, "arial");
            }
   
   }else if (guiIsChecked(hwnd,sell_check) && !guiIsChecked(hwnd,buy_check)){
       if (sl > Bid > tp){
            guiSetText(hwnd,lot_size,lotSize, 19, "arial");
       } else {
            guiSetText(hwnd,lot_size,"Invalid", 19, "arial");
            }
   
   } else {
   
   guiSetText(hwnd,lot_size,"Invalid", 19, "arial");
   
   }
   
   
   
  // Button GUI Item has Clicked Event to capture
  // You can use "guiIsClicked" command to capture the event
  if (guiIsClicked(hwnd,execute_button)){
  
   PlaySound("ok.wav");
   

   if ((guiIsChecked(hwnd,buy_check) && guiIsChecked(hwnd,sell_check) ) || ( !guiIsChecked(hwnd,buy_check) && !guiIsChecked(hwnd,sell_check))){Alert("BUY OR SELL??");}
   else {
         if (guiIsChecked(hwnd,buy_check)){  
         Alert("Buyin");
         Alert(sl);
   
          }
   else{Alert("Sellin");}
   }
   
   
   
   }
   }


What I´m trying to do here is write a basic GUI that calculates the lot size for me, and from where I can place orders and define SL and TPs. In this case, the Alert(1); only runs once and the function doesn´t seem to update with every new tick, and I cant figure out why it is, and because of that I cant calculate the lot size and display it to the GUI and eventually place an order. Is there any obvius bug Im missing? Im using <Deleted> btw. 

 
if (sl < Ask < tp){
True = non-zero and false = zero so you get:
if( 3 < 2 < 1 )
if( false < 1 )
if(     0 < 1 )
if(     true  )
if( 3 > 2 > 1 )
iftrue > 1 )
if(     1 > 1 )
if(     false )
Reason: