Indicators: Fractal_Bar_Indicator

 

Fractal_Bar_Indicator:

Fractal bar indicator

Fractal_Bar_Indicator

Author: Scriptor

 
Automated-Trading:

Fractal_Bar_Indicator:

Author: Scriptor

And it is possible to do the same, but with a choice of fractal type in enum - add a perfect fractal, that is, each subsequent bar is lower/higher than the previous one.


 
Vitaly Muzichenko:

Igor, can you do the same thing, but with the choice of fractal type in enum - add a perfect fractal, i.e. each subsequent bar is lower/higher than the previous one


Isn't it so?

if(high[i+2]>high[i+4] && high[i+2]>high[i+3] && high[i+2]>high[i+1] && high[i+2]>high[i])
   UpFr=i+2;
if(low[i+2]<low[i+4] && low[i+2]<low[i+3] && low[i+2]<low[i+1] && low[i+2]<low[i])
   DnFr=i+2;

About enum - you can change it for yourself as you need.

 

Apparently a typo:

Calculation:

  • If the Close price is above the last upper fractal, a green mark is placed
  • If the Close price above the last upper fractal is below the last lower fractal, then a red marker is placed.
  • Otherwise, a grey marker is placed
 
Scriptor:

Isn't that right?

About enum - you can change it for yourself as you want.

No, it is like this now, it is not a perfect fractal, where each subsequent bar is lower/higher than the previous one


A perfect fractal, where each subsequent bar is lower/higher than the previous one.


 
khorosh:

Apparently a typo:

Calculation:

  • If the Close price is above the last upper fractal, a green mark is placed
  • If the Close price above the last upper fractal is below the last lower fractal, then a red marker is placed.
  • Otherwise, a grey marker is put

Yes, you are correct. Thank you - sent the corrected one for checking.

 
Vitaly Muzichenko:

No, it's like this now, it's not a perfect fractal where each successive bar is lower/higher than the previous one

A perfect fractal where each successive bar is lower/higher than the previous one.

Well, then - by yourself )

 
Scriptor:

Well, you're on your own, then.)

Thanks for that)

 
Vitaly Muzichenko:

Thanks for that).

I understand you mean comparing the bodies of candles, not their shadows, correct?
 

hi,

I agree, this is a good idea,

you could put an option to calculate in the original mode (high/low) or using (open/close).

thank you

========================

Hi,

I agree, this is a good idea,

you could put an option to calculate in the original mode (high/low) or using (open/close).

Thank you

 

Scriptor,

a fantastic usability would be it's MTF (multi time frame),

being possible to look at multi-time fractals in the same graph.

========================================================

Scriptor,

a fantastic usability would be it's MTF (multi time frame),

it is possible to look at multi-time fractals in the same graph.