Please Help on Fractals

Back to topics list  | 1 2 3 To post a new topic, please log in or register
avatar
14167
RaptorUK 2013.08.19 16:30 #
 
oladapolaleye:

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.

Given a bar number how do you get the high or low of that bar ? if you don't know this you need to start reading the Book

 
avatar
59
oladapolaleye 2013.08.19 17:01 #
 
RaptorUK:
Given a bar number how do you get the high or low of that bar ? if you don't know this you need to start reading the Book


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.

Thanks.

 
avatar
14167
RaptorUK 2013.08.19 17:06 #
 
oladapolaleye:

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.

Thanks.

OK, my last post on this thread . . .

Click ---> High[] Low[] or iHigh() & iLow()

 
avatar
285
szgy74 2013.08.19 17:31 #
 
oladapolaleye:

value of LastButOneUpperFractal and LastButOneLowerFractal.



what do you exactly mean by LastButOne?

avatar
59
oladapolaleye 2013.08.19 17:36 #
 
szgy74:


what do you exactly mean by LastButOne?


That is the Fractal before the last; LastButOneUpperFractal or LastButOneLowerFractal.


Thanks.

avatar
285
szgy74 2013.08.19 17:46 #
 

the price values you need (using Raptor's code):


Low[LastButOneLowerFractal]
High[LastButOneUpperFractal]
avatar
59
oladapolaleye 2013.08.19 18:44 #
 
RaptorUK:

OK, my last post on this thread . . .

Click ---> High[] Low[] or iHigh() & iLow()


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;  
         }
      BarNumber++;
      }
      PreviousUpperFractal = iHigh(NULL,0,LastButOneUpperFractal);
      PreviousLowerFractal = iLow(NULL,0,LastButOneLowerFractal);

   Print("LastUpperFractal: ", UpperFractal, " LastButOneUpperFractal: ", PreviousUpperFractal, " LastLowerFractal: ", LowerFractal, " LastButOneLowerFractal: ", PreviousLowerFractal); 
//----
   return(0);
  }
 
avatar
5
DadeM 2015.02.19 01:53 #
 
WHRoeder:
You have to find them

Hi,

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?

 

Back to topics list   | 1 2 3  

To add comments, please log in or register