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
Hello
I need to check if each "new fractal" or "current price" is above/bellow "previous fractal".
But don't know how to find the "previous fractal" price.Tried to set existing buffers in to an array but was not success, for example tried following code but not success.
Declaration new array :
static double Fractals_UP [];
Then each time new fractal occurred :
if (bFound)
{
ExtUpFractalsBuffer[i]=dCurrent;
for (int n=10 ; n>1 ; n--) Fractals_UP[n-1] = Fractals_UP[n]; // saving 10 last fractals in to array
Fractals_UP[1]=ExtDownFractalsBuffer[i];
}
Now I expect that Fractals_UP[1] should be previous fractal price value and Fractals_UP[2] should be 2 past fractal and ...
Guess I'm totally wrong because I'm new to programming. If possible please help me to find correct way.
Bellow is the indicator :