Thank you very much. It works now. But one thing more, the LastUpperFractal, LastButOneUpperFractal, LastLowerFractal, LastButOneLowerFractal returned BarNumber instead of the value of the Fractals. Please what else could be done to have these values.
RaptorUK, you have been so good to me and others on this forum, to be sincere, I don't know how to get the value of LastButOneUpperFractal and LastButOneLowerFractal. To start to read the Book now may not solve this problem now but I'll start reading the Book for future purpose. So, please to get those two values is very important now and am also learning from you through this.
OK, my last post on this thread . . .
Click ---> High Low or iHigh() & iLow()
value of LastButOneUpperFractal and LastButOneLowerFractal.
what do you exactly mean by LastButOne?
That is the Fractal before the last; LastButOneUpperFractal or LastButOneLowerFractal.
the price values you need (using Raptor's code):
RaptorUK, million thanks to you for help, teaches, instruction and direction. It finally returned values. See how I did it:
int LastUpperFractal, LastButOneUpperFractal, LastLowerFractal, LastButOneLowerFractal;
int BarNumber = 2;
double UpperFractal, LowerFractal;
double PreviousUpperFractal, PreviousLowerFractal;
while(LastUpperFractal == 0 || LastButOneUpperFractal == 0 || LastLowerFractal == 0 || LastButOneLowerFractal == 0)
UpperFractal = iFractals(NULL, 0, MODE_UPPER, BarNumber);
LowerFractal = iFractals(NULL, 0, MODE_LOWER, BarNumber);
Print("Bar: ", BarNumber, " UpperFractal: ", UpperFractal, " LowerFractal: ", LowerFractal);
if(UpperFractal > 0.0)
if(LastUpperFractal > 0)
LastButOneUpperFractal = BarNumber;
else LastUpperFractal = BarNumber;
if(LowerFractal > 0.0)
if(LastLowerFractal > 0)
LastButOneLowerFractal = BarNumber;
else LastLowerFractal = BarNumber;
PreviousUpperFractal = iHigh(NULL,0,LastButOneUpperFractal);
PreviousLowerFractal = iLow(NULL,0,LastButOneLowerFractal);
Print("LastUpperFractal: ", UpperFractal, " LastButOneUpperFractal: ", PreviousUpperFractal, " LastLowerFractal: ", LowerFractal, " LastButOneLowerFractal: ", PreviousLowerFractal);
In your comment you say to never use a shift=1 because the bar is forming.
Is this the reason why for every shift<2 I get always values at 0?
To add comments, please log in or register