Mohammad Soubra: The above code has 0 errors
- The code as zero compile errors. Doesn't mean it hasn't logic errors and will run correctly.
- Why did you post your MT4 code in the
Root /
MT5 General section
instead of the
MQL4 section (bottom of
the Root page?)
You can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, MarketInfo does not. OrderSend does not.
Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
Zero is the same as PERIOD_CURRENT which means _Period.
No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[]
- You hard coded "GBPUSD" and used Ask. That fails unless you are on the GBPUSD chart. Either _Symbol/Ask or GBPUSD/MarketInfo
- Check your return codes (OrderSend) and find out why.
What are Function
return values ? How do I use them ? - MQL4 forum and Common Errors
in MQL4 Programs and How to Avoid Them - MQL4 Articles
- "URGENT MT4 CODING HELP" Don't SHOUT at us. https://www.mql5.com/en/forum/188856#comment_4797524
Appreciated
thanks for all
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
The above code has 0 errors
but it is only opening trades if ea attached to the GBPUSD chart
I want to multi-currency, For hedge issues. so, I would like to trade the GBPUSD (for example) from another pair chart
it should work!
before it was working...
what is going on