Please confirm, so we can be sure to provide you accurate assistance - are you using MetaTrader/MQL v4 or MetaTrader/MQL v5?
Your source code seems to indicate MQL4, but just so we can be certain, please confirm!
Please confirm, so we can be sure to provide you accurate assistance - are you using MetaTrader/MQL v4 or MetaTrader/MQL v5?
Your source code seems to indicate MQL4, but just so we can be certain, please confirm!
I would say that there is no doubt that it is MQL4.
Usually, I would have moved it, but I must have missed this one.
I will wait for confirmation from the OP and move the topic and delete some posts if necessary.
Sorry for posting an answer to a question that is not a solution.
I keep assuming questions in MQL5 section are related to MQL5 and do not sort out MQL4.
Sorry for posting an answer to a question that is not a solution.
I keep assuming questions in MQL5 section are related to MQL5 and do not sort out MQL4.
The first and most obvious clue is ...
//+------------------------------------------------------------------+ //| ForFreedom001.mq4 | //| | //| | //+------------------------------------------------------------------+
However, confirmation is needed, just in case he is trying to compile MQL4 code in an MQL5 environment and is not able to get it to work, but since he stated that it compiles, then is most probably a MQL4 environment and not MQL5.
Thank you for all the comments.
I am working on MQL4.
Please let me know if I put this post on a incorrect section which focuing on MQL5, sorry for any incoveinenct casued.
I appreciated with all the advice indeed.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Programmars
I am a super newbie who started coding about a week ago, trying to self-learn and make up an EA with my trading strategy base on Heikin Ashi and multi-time frame.
I was so happy to see my codes finally complies, however there are some error while running on the tester, such as similar problem like this https://www.mql5.com/en/forum/279663 and the trades did not go as how I wanted to be.
Doing my best to understand the mql language and modifing the codes from all sources online, here is my work along this week and hoping for somebody can point out anything that I might have missed or wrong in logic that caursed the errors.
Thank you so much for every helping hands, your reply will lead me to a big improvement. Thanks indeed.