Fractal based indicators- coding

TEAMTRADER

Active member
Messages
198
Likes
86
Fractals are based on highs and lows.
Does anyone know how to change fractal based indicators to OPEN prices?
The bit of code that I think needs amending is below. But not being a coder does not help!
Thanks to anyone who can help.
Regards
TEAMTRADER

val1 = iFractals(NULL, 0, MODE_UPPER,i);
if (val1 > 0)
v1=High;
else
v1 = v1[i+1];

val2 = iFractals(NULL, 0, MODE_LOWER,i);
if (val2 > 0)
v2=Low;
else
v2 = v2[i+1];
 
I've found the answer to the above - BUT - I cannot see if there is a way to have the fractal indicator based on the immediately following candle rather than the confirmed candle (the start of the next candle).
I've looked at the code of the indicator and it looks like 'buffers' is the one that will stop an immediate signal. I have never coded so I just do not know.
I have copied and pasted below the part of the code that may be able to change the indicator reaction time.
Thanks if you are able to advise.
TEAMTRADER

---- buffers
double v1[];
double v2[];
double val1;
double val2;
int i;

int init()
{

IndicatorBuffers(2);
 
Top