store ma value in mql5

 

hello, first of all thank you for read my post. I wrote custom indicator at mql4. But now i need to write that custom indicator at mql5. But there is a problem that is:

in mql4 iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,i) this format is available but in mql5 iMA(_Symbol,_Period,10,0,MODE_SMA,PRICE_CLOSE) this format is available. In mql5 i can not store every moving average value in array without last parameter of iMA in mql4. How to fix it. I attached my script of mql4.

Files:
ma10.mq4  3 kb
 
Read the documentation for iMA and CopyBuffer
 
Keith Watford:
Read the documentation for iMA and CopyBuffer

i read but i can not fully understand

 
woohee:

hello, first of all thank you for read my post. I wrote custom indicator at mql4. But now i need to write that custom indicator at mql5. But there is a problem that is:

in mql4 iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,i) this format is available but in mql5 iMA(_Symbol,_Period,10,0,MODE_SMA,PRICE_CLOSE) this format is available. In mql5 i can not store every moving average value in array without last parameter of iMA in mql4. How to fix it. I attached my script of mql4.

you need to post your mql5 code if that i what you have the problem with..

 
Paul Anscombe:

you need to post your mql5 code if that i what you have the problem with..

i do not know how to write that code in mql5

 
woohee:

i do not know how to write that code in mql5

Documentation:  https://www.mql5.com/en/docs

There are also lots of examples/articles on this site to help you.

You need to start by trying, otherwise it will be an endless set of questions, as I said to you before.

MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
  • www.mql5.com
MetaQuotes Language 5 (MQL5) is a high-level language designed for developing technical indicators, trading robots and utility applications, which automate financial trading. MQL5 has been developed by MetaQuotes Software Corp. for their trading platform. The language syntax is very close to C++ enabling programmers to develop applications in...
 
woohee:

i read but i can not fully understand

Read it and try it, you may make mistakes but that is part of learning.

It can be difficult to understand when reading the documentation for the first time, but if you persevere, the understanding will come.

The good thing is that once you understand how to use iMA you will be able to use iRSI, iCCI, iATR etc with no problems.

Reason: