I advice you to read the documentation and see the code of a sample EA like moving averages EA (its in the C:\Program Files\MetaTrader 5\MQL5\Experts\Examples\Moving Average), then you will get an idea of code structure in MQL5.
a good place to start though is
Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners
- 2010.06.09
- Samuel
- www.mql5.com
The Expert Advisors programming in MQL5 is simple, and you can learn it easy. In this step by step guide, you will see the basic steps required in writing a simple Expert Advisor based on a developed trading strategy. The structure of an Expert Advisor, the use of built-in technical indicators and trading functions, the details of the Debug mode and use of the Strategy Tester are presented.
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 ALL,
IM A C# PROGRAMMER AND I WOULD LIKE SOME HELP TO PROGRAM THIS FOLLOWING EA:
WHEN SILVER 1 HOUR CANDLE FALLS: X% FOR EXAMPLE, EVERY ONE HOUR CANDLE OF -1% ON SILVER... OPEN A BUY WITH A STOP LOSS.
I WOULD LIKE TO TEST THE STRATEGY BUT DONT KNOW THE MATH AND COMMAND NECESSARY.
ANY HELP WOULD BE VERY APPRECIATED !!
THANK YOU VERY MUCH COMMUNITY !!