Download MetaTrader 5

Drawing a line for Fractals

To add comments, please log in or register
gipsiu
5
gipsiu  

Hi,

I have a problem with drawing a line between two points in my script.

I use this piece of code to get fractals collection:

fractalHandler = iFractals(tradeSymbol, PERIOD_H4);
CopyBuffer(fractalHandler, 0, 0, 20, uFractals);


Then, after a few calculations I would like to draw a line which connect two fractals - let say uFractals[5] with uFractals[12]. I wanted to use something like this:

ObjectCreate(0, "myTrendLine", OBJ_TREND, 0, datatime, uFractals[5], datatime, uFractals[12]);

 But I have now idea how to get a datatime value for my selected fractals.

Does anyone know the trick how to get a datetime value for single fractal? Or maybe there is a better/easiest way to draw a line between two points?

 

Br,
Andrzej 

phi nuts
2181
phi nuts  
gipsiu:

Hi,

I have a problem with drawing a line between two points in my script.

I use this piece of code to get fractals collection:

Then, after a few calculations I would like to draw a line which connect two fractals - let say uFractals[5] with uFractals[12]. I wanted to use something like this:

 But I have now idea how to get a datatime value for my selected fractals.

Does anyone know the trick how to get a datetime value for single fractal? Or maybe there is a better/easiest way to draw a line between two points?

Br,
Andrzej 

Use CopyTime and use the same index array as the index array for iFractal's CopyBuffer (uFractals).
To add comments, please log in or register