I need to know something about importing MQH files into my source code

 

Hi, so this might be a very dumb question.

I'm just starting out with developing an EA myself, because I like to code and like Forex.

I want to make a simple signal EA that tells me when to BUY, SELL and CLOSE a trade based on Stochastic Oscillator, MA and RSI all with my own custom parameters that I have tested.

Now, I know MT4 comes with all these indicators standard. However, I read that I need to "#include" these indicators if I want to call their functions.

I read that I need .mqh files, and when I look for them in the MQL4 folder, I can find some but I don't see the Oscillator and RSI as .mqh files, I do see them as .mq4 files.

Can I also use those? Or how does this exactly work? And where can I download .mqh files for my project?


To all the experienced people that are going to roast me, this is my first time every posting on a forum so don't ruin it for me haha.

 
Liam de:

Hi, so this might be a very dumb question.

I'm just starting out with developing an EA myself, because I like to code and like Forex.

I want to make a simple signal EA that tells me when to BUY, SELL and CLOSE a trade based on Stochastic Oscillator, MA and RSI all with my own custom parameters that I have tested.

Now, I know MT4 comes with all these indicators standard. However, I read that I need to "#include" these indicators if I want to call their functions.

I read that I need .mqh files, and when I look for them in the MQL4 folder, I can find some but I don't see the Oscillator and RSI as .mqh files, I do see them as .mq4 files.

Can I also use those? Or how does this exactly work? And where can I download .mqh files for my project?


To all the experienced people that are going to roast me, this is my first time every posting on a forum so don't ruin it for me haha.

MT4 has it own dedicated place for it's topic, so it needs to be posted there

As for your question you need to read about iCustom

iCustom - Technical Indicators - MQL4 Reference
iCustom - Technical Indicators - MQL4 Reference
  • docs.mql4.com
iCustom - Technical Indicators - MQL4 Reference
 

No, you don't need to use "#include" for the built-in indicators. You just use their respect functions directly, for example iRSI or iStochastic —  Technical Indicators - MQL4 Reference

EDIT: In the future, please post in the MetaTrader 4 / MQL4 section for all related topics.

Technical Indicators - MQL4 Reference
Technical Indicators - MQL4 Reference
  • docs.mql4.com
Technical Indicators - MQL4 Reference
 
Navdeep Singh #:

MT4 has it own dedicated place for it's topic, so it needs to be posted there

As for your question you need to read about iCustom

Thank you for your reply!
 
Fernando Carreiro #:

No, you don't need to use "#include" for the built-in indicators. You just use their respect functions directly, for example iRSI or iStochastic —  Technical Indicators - MQL4 Reference

EDIT: In the future, please post in the MetaTrader 4 / MQL4 section for all related topics.

Thank you for your reply, didn't know.
 
Liam de #: Thank you for your reply, didn't know.
You are welcome!