My own Price in iMA, Possible ?

 

HI

I need to use iMA() function but i would like to use my own Price not Applied price enumeration values. It is possible ?

example :

iMA(NULL,0,EMA_Period,0,MODE_EMA,PRICE_CLOSE,i);

i want change PRICE_CLOSE to for example 14

 
In this context what does 14 mean ?
 
RaptorUK:
In this context what does 14 mean ?
some value which should be calculate by iMA
iMA(NULL,0,EMA_Period,0,MODE_EMA,14,i);
 
lukibest:
some value which should be calculate by iMA


Looks like you have to make your own new definations before you will ever be able to use it
 
lukibest:

HI

I need to use iMA() function but i would like to use my own Price not Applied price enumeration values. It is possible ?

example :

i want change PRICE_CLOSE to for example 14

Hi Lukibest,

Since the parameter in that location is looking for a typical price format (eg: 5 digits)...you can try any value that fits the price format...?

Instead of 14...it may be that you have to use something like : 1.23501

You can try either a fixed or calculated 5 digit value that replaces the PRICE_CLOSE parameter...

My question would be...why?

What is the expected outcome of using a "non-price" value to get your iMA..??

Hope this helps,
Robert
 
It's not a price value that goes in there . . . it is a type value
 
RaptorUK:
It's not a price value that goes in there . . . it is a type value

Hi Raptor,

Thanks for the link. Guess creativity here didn't work...lol!

So it looks like the answer to using...14...is no...?

Still curious why someone would like to try to change that parameter...and what the expected outcome would be.

Thanks again,

Robert

 

hi,


Here https://www.mql5.com/en/forum/138591 i create function Tema(close,n) right know i want call this function with parameters

p1=Tema(close,n);

p2=Tema(p1,n); 


but in function Tema() is iMA and p1 is different then Price and i have bad value in p2.


Thanks

lukibest


 
lukibest:
I need to use iMA() function but i would like to use my own Price not Applied price enumeration values. It is possible ?

Simply modify the iMA code to use another enumeration.

Don't have the iMA code then write a new indicator buffer1[] = your price calculation, buffer0[] = iMAOnArray(buffer1...)

Reason: