I`m using the build-in indicator, I thought it will be working as it should. How can I initialize the indicator buffers, this is being done in the indicator code, right?
return iFractals(symbol,timeframe,mode,shift);
Currently I do the following to find the last fractals, I use this in a trailing stop loss.
double fractal;
do
{
fractal=iFractals(Symbol(),Period(),mode,shift++);
}
while(fractal==EMPTY_VALUE || fractal==DBL_MAX || fractal==0);
--> Do you mean I can use the following?
--> while(iFractals(symbol,timeframe,mode,shift)==high/low[shift])
Tobias Wolf:
Currently I do the following to find the last fractals, I use this in a trailing stop loss.
double fractal;
do
{
fractal=iFractals(Symbol(),Period(),mode,shift++);
}
while(fractal==EMPTY_VALUE || fractal==DBL_MAX || fractal==0);
--> Do you mean I can use the following?
--> while(iFractals(symbol,timeframe,mode,shift)==high/low[shift])
No... he's talking about not using the == operator to compare doubles. Instead use
bool doubles_equal(double x, double y) { return (fabs(x - y) < _Point); }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
I`ve experienced some strange behaviour. Sometime I got a strange value back from the used indicator within the EA I`m writing. It`s not EMPTY_VALUE and not DBL_MAX.
BUY direction new 'SL_FRACTALS' tsl at -858993459