This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Problem with evaluating a string


Back to topics list
avatar
129
Vooch 2005.07.15 09:36 
In ColdFusion and PHP (other computer languages), I'm able to evaluate a string, but in MT4, it seems I cannot. Here's an example in MT4 of what I want to do:


string longsql;
longsql = " (a<1) && (b>2) ";
if (longsql) {
// buy it!
}


I'm getting these error messages:
'longsql' - compare expression expected C:\Program Files\MetaTrader 4\experts\Vooch.mq4 (1349, 4)
'longsql' - condition cannot be string C:\Program Files\MetaTrader 4\experts\Vooch.mq4 (1349, 4)

- Vooch
avatar
4464
Slawa 2005.07.15 12:07 
evaluating source codes on fly is impossible
avatar
129
Vooch 2005.07.15 20:26 
> evaluating source codes on fly is impossible

It's evaluating a variable - not source code.



Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets