Coding help - page 68

 

It has been solved in the elite section already (the speed problem that caused CPU overload)

Paul Atreides:
Dear Guru of mql,

Possible optimize this indi? It works fine, but powerfully holds up the terminal.

Respectfully yours
 

Sorry, I dont have access to the elite section (((Posiible to solve this problem here?

If you have access, can I ask optimized indie as a private message ?

 

Muad'Dib,

Access to elite section is pretty straight forward and you should not have any problems accessing it and solving the issue you have.

Paul Atreides:
Sorry, I dont have access to the elite section (((Posiible to solve this problem here? If you have access, can I ask optimized indie as a private message ?
 
mladen:
zigflip Try this one out

Grreat thank you so much, kind Sir!

 

Hi,

i have an indicator that draw fibo tools with specific name.

I need to use the 0 and 100 level how SL and TP.

How i can get the value of the level for use it in the orderend function=

Thanks

 

From your description, if it is using objects, use ObjectGetValueByShift() function, Here is the description of the function

__________________________________________

double ObjectGetValueByShift(string name, int shift)

The function calculates and returns the price value for the specified bar (shift related to the current bar). The price value is calculated by the first and second coordinates using a linear equation. Applied to trendlines and similar objects. To get the detailed error information, one has to call the GetLastError() function.

__________________________________________

dasio:
Hi,

i have an indicator that draw fibo tools with specific name.

I need to use the 0 and 100 level how SL and TP.

How i can get the value of the level for use it in the orderend function=

Thanks
 
mladen:
From your description, if it is using objects, use ObjectGetValueByShift() function, Here is the description of the function

__________________________________________

double ObjectGetValueByShift(string name, int shift)

The function calculates and returns the price value for the specified bar (shift related to the current bar). The price value is calculated by the first and second coordinates using a linear equation. Applied to trendlines and similar objects. To get the detailed error information, one has to call the GetLastError() function.

__________________________________________

Thank you but if i have the 0 and 100 level in the same shift bar?

 

dasio

Each object has a unique name (there can not be two objects with a same name on one chart) so you have to know the name of the object. If you know the name, only that object is going to be examined for the value you need

All this I am telling assuming that what you have are actually objects on chart. Otherwise it is a classical approach through indicator buffers

dasio:
Thank you but if i have the 0 and 100 level in the same shift bar?
 
mladen:
dasio

Each object has a unique name (there can not be two objects with a same name on one chart) so you have to know the name of the object. If you know the name, only that object is going to be examined for the value you need

All this I am telling assuming that what you have are actually objects on chart. Otherwise it is a classical approach through indicator buffers

Maybe i don't understand the function. I have the object draw in the chart. I attach an image to be more clear.

I know the name of the object and i need to find the 0 and 100 level of fibonacci.

Now i study better the function.

However with the method you descrive it is possible to get this value?

Thank you

Files:
fibo.gif  35 kb
 

dasio

for fibo type of objects (it is an object made of more than one "sub-objects") try using something like this

double levelValue = ObjectGet(fiboName,OBJPROP_FIBOLEVELS,levelNumber);
dasio:
Maybe i don't understand the function. I have the object draw in the chart. I attach an image to be more clear.

I know the name of the object and i need to find the 0 and 100 level of fibonacci.

Now i study better the function.

However with the method you descrive it is possible to get this value?

Thank you

Reason: