I am confused about new version of mql4.
Can anyone send me some sample indicators (like moving average etc.)? So I will learn by myself.
Thank You.
Sorry for my poor English.
Most of the "old" mql4 code still works . . . you will find examples here: https://www.mql5.com/en/code
I am really confused new function .
like these
void OnStart();
void OnInit();
void OnDeinit(const int reason);
void OnTick();
void OnTimer();
double OnTester();
void OnChartEvent(const int id, // Event ID const long& lparam, // Parameter of type long event const double& dparam, // Parameter of type double event const string& sparam // Parameter of type string events );
int OnCalculate (const int rates_total, // size of input time series const int prev_calculated, // bars handled in previous call const datetime& time[], // Time const double& open[], // Open const double& high[], // High const double& low[], // Low const double& close[], // Close const long& tick_volume[], // Tick Volume const long& volume[], // Real Volume const int& spread[] // Spread );
In the old version I can use these
int init();
int deinit();
int start();
but now I can't.
metbright:
In the old version I can use these
int init();
int deinit();
int start();
but now I can't.
Yes you can.
Delete all the OnCalculate() stuff and write,
int start() { // you can write code like before, there are some small changes // the compiler will notify you about them if neccessary // or learn about the new mql4 functions its not difficult // and there are some useful new features to use return(0); }
So i will ask one more question?
What are the difference between "extern" and "input" ?
does pretty much the same thing except input variables are constant(value of the variable cannot be changed in the code) and input has more options, you can make drop down lists, use friendly descriptions that appear in the properties dialoge ..
does pretty much the same thing except input variables are constant(value of the variable cannot be changed in the code) and input has more options, you can make drop down lists, use friendly descriptions that appear in the properties dialoge ..
I understood, thank you very much.
One more question haha.
I can't use debugger in MetaEditor the icon is gray out.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am confused about new version of mql4.
Can anyone send me some sample indicators (like moving average etc.)? So I will learn by myself.
Thank You.
Sorry for my poor English.