Inserted Code
int abc1 = 123; int abc = 456; int e = 1; printf (abc+e);
supposedly it will output "123", but it fail with error "abc" is not declare. How to fix the error?
Assign imported indicator value into variable 4 replies
Is there EA/Script for "Pending Order" entry and can assign Magic No.? 25 replies
How to dynamically define an array 5 replies
how can I assign previous bar rsi value (learning mt4 language) 4 replies
can we manually assign a magic number 4 replies
Disliked{quote} I want to combine variable name, but not combine variable value. In mql4 language. int abc = 456; int e = 1; How combine value of e into variable name of abc to become abc1?Ignored
Disliked{quote} I want to combine variable name, but not combine variable value. In mql4 language. int abc = 456; int e = 1; How combine value of e into variable name of abc to become abc1?Ignored
Disliked{quote} I don't code in mql4 yet, but I understand what you are asking. I did a quick search and it doesn't seem easy to do this directly in mql4. But you may be able to do a workaround by using an array. This workaround is typically used in other languages.Ignored
#define print(CODE) Print(#CODE, " = ", CODE)
void OnStart() { int a = 1; int b = 1; int c = 2; print((a + b) / c); print(TimeCurrent()); print(my_add(a, b)); } int my_add(int a, int b) { return a + b; }
(a+b)/c = 1 TimeCurrent() = 2018.12.14 23:59:58 my_add(a,b) = 2