ima in momentum

 

hi

i wana to create a ea about momentum pls help me to do it!

when i type this:

 double m=iMA(NULL,0,28,0,MODE_SMMA,iMomentum(NULL,0,40,PRICE_CLOSE,0),0);

Comment(m);

mt4 is shown 0.0 for me 

please tell me whats wrong with this?

 
iMAOnArray - Technical Indicators - MQL4 Reference
iMAOnArray - Technical Indicators - MQL4 Reference
  • docs.mql4.com
Unlike iMA(...), the iMAOnArray() function does not take data by symbol name, timeframe, the applied price. The price data must be previously prepared. The indicator is calculated from left to right. To access to the array elements as to a series array (i.e., from right to left), one has to use the ArraySetAsSeries() function.
 
A post not in English has been removed.
 

tnx for your help but i tried to know about imanoarray but if you can help me with a sample i can understand it better.

with best regards.

 
The documentation has your sample.
 
Hamed Feyzi:

In future please post in the correct section

I will move your topic to the MQL4 and Metatrader 4 section.

 
Keith Watford:

In future please post in the correct section

I will move your topic to the MQL4 and Metatrader 4 section.

Do you have a automatic predefined message each time you move a topic here ?

Or you still have to write the same again and again ?

 
Alain Verleyen:

Do you have a automatic predefined message each time you move a topic here ?

Or you still have to write the same again and again ?

Copy and paste.

 
Keith Watford:

Copy and paste.

It's what I thought. Ask Metaquotes a new feature to post an additional message when moving something, you should have it within 3 or 4 years. :-D
 
Keith Watford:

Copy and paste.

A more useful tip maybe, do you know the shortcut "Windows" key+v ? It gives you access to the clipboard, could be useful for you.

Thanks for the thankless job done here.

 
Thanks Alain.