Perhaps you should read the manual again. Event Handling Functions - Functions - Language Basics - MQL4 Reference
The OnStart() function is the Start event handler, which is automatically generated only for running scripts.
Your second code is in OnTick and your image shows that is is working.
Your first code is in OnStart but your image shows "Expert A7." If it is an expert, why would you think OnStart would be called?
Perhaps you should read the manual again. Event Handling Functions - Functions - Language Basics - MQL4 Reference
Your second code is in OnTick and your image shows that is is working.
Your first code is in OnStart but your image shows "Expert A7." If it is an expert, why would you think OnStart would be called?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
https://docs.mql4.com/basis/function/parameterpass
Heres the code above, 1st Method
I am still new at programming so correct me if Im wrong. When I use the code above to get to know better of how it works, It doesnt show(Print) on the Journal Log.
I guess this doesnt show up in the log because its a script program? So i used this one.
It just shows up and it works fine. I added & in the function(int &i, int &j) and void OnTick()
Isnt the intention of the Document suppsoe to show the leaners how it works? (in log, cuz they used print) OR is my understanding wrong with thje code described in the document(since its not printing out in my log)
Im using Alpari, if that helps.