Script structure New comment [Deleted] 2010.07.30 04:34 int start() { int A; while(true) { A++; Comment(A); Sleep(10); RefreshRates(); if(Close[1]-Open[1]>0) { Alert("Bullish bar"); break; } } return(0); } Sleep(10) is to ease pressure on processor. while(true) is to make the script search until the condition is met. Is there way to modify the script to make it better for platform and computer processor and make the script like work better? Thank You. New to scripts Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes Indicators Time [Deleted] 2010.07.30 07:45 #1 Make it an indicator. Alexander 2010.07.30 08:46 #2 Your code can crash your terminal int newtime; int start() { if(newtime==Time[0])return(0); newtime=Time[0]; if(Close[1]-Open[1]>0)Alert("Bullish bar"); return(0); } New comment
Sleep(10) is to ease pressure on processor.
while(true) is to make the script search until the condition is met.
Is there way to modify the script to make it better for platform and computer processor and
make the script like work better?
Thank You.