Hi community.
This is not very serious.
I'm a programmer, I worked with MQL4 for about 2 years, wrote many EAs & Indicators for me, but I cared about the functions, performance, logical, ... only.
Normally, I use extern when I write EA & input for Indicator (as I saw on many EAs & Indicators when I started to learn MQL4).
Today, I suddenly notice that I can use extern or input for both EA & Indicator.
It might be my small mistake, I used extern for 1 Indicator for about 3 months ago, it didn't affect to the program. I saw that when I've just opened that Indicator to modify.
That's very interesting, then I tried to use input for EA & vice versa. Perfect! All worked well.
What is the truly different between input & extern on EA vs Indicator?
Yours sincerely,
Giang Nguyen
I think you mean like this maybe....
1: input int Hello = 10;
or
2: extern int Hello = 10;
You can read some documentation about it https://www.mql5.com/en/docs/basis/variables/inputvariables
- www.mql5.com
I understand now.
Both of them are nearly the same, but the input is constant in program.
Thanks all.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi community.
This is not very serious.
I'm a programmer, I worked with MQL4 for about 2 years, wrote many EAs & Indicators for me, but I cared about the functions, performance, logical, ... only.
Normally, I use extern when I write EA & input for Indicator (as I saw on many EAs & Indicators when I started to learn MQL4).
Today, I suddenly notice that I can use extern or input for both EA & Indicator.
It might be my small mistake, I used extern for 1 Indicator for about 3 months ago, it didn't affect to the program. I saw that when I've just opened that Indicator to modify.
That's very interesting, then I tried to use input for EA & vice versa. Perfect! All worked well.
What is the truly different between input & extern on EA vs Indicator?
Yours sincerely,
Giang Nguyen