iCustom Fractals - RunnerUp

 

Hi all!

I found a fractal custom indicator that I am fond of. Also, I modified it a bit to represent a clearer image of support and resistance. That's right! lol... ;)

My wish is to select the last created fractal written on the chart. If this cannot be done, maybe the possibility of using parameters that the custom indicator uses to write a fractal, and instead of writing a fractal use a Boolean data type "true" to announce that the "newest fractal drawn" parameters have been met. AND.... Maybe select the high/low of the bar that the fractal was written above/below.

Question: If anyone has extensive experience with custom indicators (specifically fractals) please feel free to express your thoughts on a possible solution.

My intentions are to use this custom indicator in an expert advisor. I have attached the custom indicator to this topic.

Thank you!

 

I have three questions regarding this fractal indicator.


1. What is the purpose of bFound=true?;

2. What is the purpose of the i--; at the end of the program?

3. Is !bFound the same as bFound=false?;


Thank you.

 

i-- is the same as

i=i-1 ; it means subtract 1 from the variable i.

the exclamation mark or shreek symbol ! in MLQ means NOT so not equal to is !=

bFound is a boolean value that is a value that can only be true or false. So if bFound has the value true !bFound has the value false.

the 'b' of bFound is the programmers way of giving the variable meaning as in bottomfound but heck doing all that typing is just crazy lets shorten it to bFound.

 

@ Ickyrus: Hi Ickyrus,

Thanks very much for your response! I plan to browse through the code again to see if there is anything else that doesn't click in my brain regarding the logic performed by the indicator.

Thanks again Ickyrus.

 

Example: UpperFractal

Fractals are comprised of 5 bars. Understood.

High[3]>High[2] & High [3]>High[4]. Understood.

Question: Does High[1] and High[5] need to be lower than High[4],High[3] and High[2] || just High[3] ?

Thank you.

 
from https://www.mql5.com/en/code dCurrent is the bar being checked for as the turning point bar and any of the conditions checked over 5,6,7,8 and 9 bars but dCurrent must be higher than or equal the bars either side of it. only one of the tests need to be found as true and if found the other tests are ignored. I suspect that 'b' prefix of bFoound stands for bool. there was a sugested coding practice that when naming variables the first letter of the variable should indicate the number type it was declared as.
 

@Ickyrus: Thank you much for sharing your knowledge regarding the Fractals indicator. Also, I believe that setting a prefix of the data type at the beginning of variables could assist me for visualization purposes as I code.

Thank you again!

 
Is it only me or some else also that this indicator response is delayed. So using it in expert adviser will not make it perfect entry...
 
dineshydv:
Is it only me or some else also that this indicator response is delayed. So using it in expert adviser will not make it perfect entry...

Cuz it takes tow candles to make a decision whether its high/low or not
 
majid.r:

Cuz it takes tow candles to make a decision whether its high/low or not

are you for real ?

you responding to a message from 1.5 years ago

Reason: