Download MetaTrader 5

How to read values from custom indicator while indicator doesn't use buffers?

To add comments, please log in or register
Sherif Hasan
7378
Sherif Hasan  

How to read values from custom indicator while indicator doesn't use buffers?

I am writing new ea which by using custom indicator.but indicator not using buffers. so how can i read values for ea?

Plesse give me a suggetions to solve this issues.

Alain Verleyen
Moderator
31936
Alain Verleyen  
sheriffonline:

How to read values from custom indicator while indicator doesn't use buffers?

I am writing new ea which by using custom indicator.but indicator not using buffers. so how can i read values for ea?

Plesse give me a suggetions to solve this issues.

What are using the indicator ? Objects ? Then read values directly from objects.

Or ?

Sherif Hasan
7378
Sherif Hasan  
Is there any example code to read values from objects? please support!
Ubzen
5394
Ubzen  
sheriffonline:
Is there any example code to read values from objects? please support!

https://docs.mql4.com/objects.

Search for the object just like you search for orders. Then use ObjectGet() to retrieve values. Read the documentation above for other helpful functions. Example.

for(int i=ObjectsTotal()-1; i>=0; i--){
    name=ObjectName(i);
    if(ObjectType(name) != OBJ_HLINE) continue;
    x=ObjectGet(name, OBJPROP_PRICE1);
    return(x);
}
Carl Schreiber
6970
Carl Schreiber  

you can use: - GlobalVariables, -Files, -namedPipes, -DLL, (DDE 'knows' only one way I think: from MT4 to e.g. EXCEL)

Gooly

To add comments, please log in or register