BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Adding Fractals to BullCharts
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Adding Fractals to BullCharts

 Post Reply Post Reply Page  <12
Author
Message / View First Unread Post
SayaPolo View Drop Down
Newbie
Newbie


Joined: 19 Nov 2018
Location: Sydney
Posts: 10
Post Options Post Options   Quote SayaPolo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Nov 2018 at 11:25am

Hi Maximo

I recently came across Bill Williams’s Alligator and his Awesome Oscillator and this could be traded in conjunction with Fractals. I am hopeless in coding and just wonder if you can assist me in coding of these 2 indicators in Bull Chart. I found these in the websites.

ALLIGATOR Indicator

Alligator is the indicator which is designed to show a trend absence, its formation and direction. Bill Williams saw metaphorical resemblance

between alligator’s behaviour and the allegory of the market’s one: sleeping gives way to price-hunting after which it’s again time to

sleep. The longer the alligator sleeps the hungrier it becomes and logically, the stronger the market movement will be.

 

The indicator includes 13-, 8- and 5-period smoothed moving averages each with its own displacement (8, 5 and 3 bars respectively)

which are coloured blue, red and green thus representing the alligator’s jaw, teeth and lips.

 How to construct

MEDIAN PRICE = (HIGH + LOW) / 2

ALLIGATORS JAW = SMMA (MEDEAN PRICE, 13, 8)

ALLIGATORS TEETH = SMMA (MEDEAN PRICE, 8, 5)

ALLIGATORS LIPS = SMMA (MEDEAN PRICE, 5, 3)


AWESOME OSCILLATOR

Awesome Oscillator (AO) represents a momentum indicator which reflects precise changes in

the market driving force.

 

How to construct

MEDIAN PRICE = (HIGH+LOW)/2

AO = SMA(MEDIAN PRICE, 5)-SMA(MEDIAN PRICE, 34)

where

SMA — Simple Moving Average.

Thanking you in anticiapation.



Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jul 2019 at 4:56pm
Dear SayoPolo

I am not Maximo,  I do not know where he has gone but he was very generous in the past in supplying Bullscript code for user questions on this site, from which I learned a lot.   

I looked at Bill Williams Chaos Theory work between 2008 and 2011 when I was also learning how to code Bullscript.  My interpretations of his indicators are in an old custom indicator file in my archives.

Bill Williams Chaos approach was a time and price only approach therefore, from my perspective, it is only analyzing supposed price effects.  

If you want to understand the cause of the price movements then you perhaps need to focus on ways to measure the forces of supply & demand (which is distinct from the measuring the amounts of buying and selling volume within bars or across bars).  A force measurement, is different from an amount of buying volume or selling volume measurement, but to get to the former, you need to work out the latter.  Also, as far as I can see force measurements do not suffer from as much  lag, as amount measurements, if computed properly.

With a computer you can do these calculations. Most older Tape Readers or early chart reading Trading Masters (without access to computers), who suggested they were relying on "intuition", could not do these computations, in my opinion.

What I will do below is set out a chart showing about 9 of my old adaptation indicators of Chaos theory  in Bullscript.  

In Bill Williams approach he relied heavily on calculations using the median price which Bullscript has as a standard indicator.  But I tried many other price vibration variations rather than thinking the median price was ideal.  
PLDOT calculated over 3 bars by a Canadian Trading Master (do a Google search) was a good substitute for the MP, and my faster TaPLdot adaptation calculated over 2 bars, in my opinion was even better.
You can play around with any of the indicators codes to your hearts content but remember they only interpreting price effects.  Supply & demand is being ignored in the Chaos theory approach to interpreting price effects.



Edited by cmacdon - 21 Jul 2019 at 6:20pm
BC User since June 2007
Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jul 2019 at 5:20pm
For some reason I could not up load a png image but I will check with Bullcharts tomorrow to get around image down load any problems.

I will try to post below some of the indicator codes before you can see the images for my selected chart period.

Also you will perhaps need the Median price (MP) indicator to be set up in you standard indicator file as some of my custom indicators refer to the original Bill Wiliams formulations but for all practical purposes you could substitute C for the median price code instead of MP.  As William C. Garrett suggested in the 1970's all calculations are just approximations.

The first seven indicators show up in a panel.  the last two indicators show up on the price chart.

Don't ask me to decode any indicator as I moved on a long time ago from trying to interpretations of time and price.  Even Gann suggested that when he relied on space measurements alone, he was prone to make mistakes and incur losses.

cmacdon






Edited by cmacdon - 21 Jul 2019 at 5:48pm
BC User since June 2007
Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jul 2019 at 5:40pm

Independent Indicator 1

{Chaos AO }
{ Chaos Awsome Oscillator - measures momentum }
{ A very close approximation of MFI }
{ Plot as histogram }
ma(MP(),5,S) - ma(MP(),34,S);

Independent Indicator 2

{Chaos AO }
{ Chaos Awsome Oscillator - measures momentum }
{ A very close approximation of MFI }
{ Plot as histogram }
n1 := input("Shorter moving average",5,1);
n2 := input("Longer moving average",34,1);
Green:=IF( ma(MP(),n1,S) - ma(MP(),n2,S) >=0,ma(MP(),n1,S) - ma(MP(),n2,S),undefined);
Red:=IF( ma(MP(),n1,S) - ma(MP(),n2,S) <0,ma(MP(),n1,S) - ma(MP(),n2,S) ,undefined);
[name=Green; linestyle=bar; width=4] [color=Green; name=Greenlight]
If(Green>=0,Green,undefined);
[name=Red; linestyle=bar; width=4] [color=Orange; name=Redlight2]
If(Green>=0 AND Green <Hist(Green,1), Green,undefined);

[name=Red2; linestyle=bar; width=4] [color=Red; name=Redlight]
If(Red<0, Red,undefined);
[name=Red4; linestyle=bar; width=4] [color=Lime; name=Redlight2]
If(Red <0 AND Red >Hist(Red,1), Red,undefined);



Independent Indicator 3

ns := input("Time periods",1,1);
nl := input("Time periods",14,1);

{Chaos AO }
{ Chaos Awsome Oscillator Adapted PLDot  - measures momentum }
{ A very close approximation of MFI }
{ Plot as histogram }
TaPLDot:=(((hist(h,0)+hist(Low,0)+hist(C,0))/2)+((hist(h,1)+hist(Low,1)+hist(C,1))/2))/2;
ma(TaPLDot,ns,S) - ma(TaPLDot,nl,S);



Independent Indicator 4

{Chaos AO with signals}
{ Chaos Awsome Oscillator - measures momentum CMD adapted to match Metastock indicator }
{ A very close approximation of MFI }
{ Plot as histogram }
Red:=If(ma(MP(),5,S) - ma(MP(),34,S)<Ref(ma(MP(),5,S) - ma(MP(),34,S),-1) OR (Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)<Ref(ma(MP(),5,S) - ma(MP(),34,S),-2)
AND ma(MP(),5,S) - ma(MP(),34,S)=Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)),ma(MP(),5,S) - ma(MP(),34,S),0);
Green:=If(ma(MP(),5,S) - ma(MP(),34,S)>Ref(ma(MP(),5,S) - ma(MP(),34,S),-1) OR (Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)>Ref(ma(MP(),5,S) - ma(MP(),34,S),-2)
AND ma(MP(),5,S) - ma(MP(),34,S)=Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)),ma(MP(),5,S) - ma(MP(),34,S),0);
AOcrossoverBuy:= Green>0 and Ref(Green,-1)< 0;
AOsaucerBuy:= Green>0 and Green> Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Green>0 and Ref(Red,-1)>0;
AOUnderlineBuy:= Green<0 and Green> Ref(Red,-1);
AOUnderlinesecondBuy:= Green<0 and Green> Ref(Green,-1) and Green> Ref(Green,-2) and Ref(Red,-3)<0;
AOcrossunderSell:= Red<0 and Ref(Red,-1)>0 ;
AOOverlineSell:= Red>0 and Red< Ref(Green,-1);
AOUnderlineSell:= Red<0 and Red> Ref(Green,-1);
AOsaucerSell:= Red<0 and Red< Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Red<0 and Ref(Green,-1)<0;

Red;
Green;
{ Markers }
[name=CB; linestyle=marker; marker=type15; tooltip=" AOcrossoverBuy "]
[color=green]
AOcrossoverBuy;
{ Markers }
[name=SauB; linestyle=marker; marker=type17; colour=green;tooltip=" AOsaucerBuy "]
[color=green]
AOsaucerBuy;
{ Markers }
[name=UB; linestyle=marker; marker=type15; tooltip=" AOUnderlineBuy"]
[color=green]
AOUnderlineBuy;
{ Markers }
[name=U2B; linestyle=marker; marker=type15; tooltip=" AOUnderlinesecondBuy"]
[color=green]
AOUnderlinesecondBuy;

{ Markers }
[name=CS; linestyle=marker; marker=type15; tooltip=" AOcrossunderSell"]
[color=red]
AOcrossunderSell;
{ Markers }
[name=OS; linestyle=marker; marker=type28; tooltip=" AOUnderlinesecondBuy"]
[color=Red]
AOOverlineSell;
{ Markers }
[name=US; linestyle=marker; marker=type29; tooltip=" AOUnderlineSell"]
[color=Red]
AOUnderlineSell;
{ Markers }
[name=SauS; linestyle=marker; marker=type17; colour=green;tooltip=" AOsaucerSell "]
[color=green]
AOsaucerSell;

Independent Indicator 5
{Chaos AO with signals}
S1 := inputma("Method",SIMPLE);
n1 := input("Shorter moving average",5,1);
n2 := input("Longer moving average",34,1);
methodroc := inputroc("Mode");
Red:=If(ma(MP(),n1,S1) - ma(MP(),n2,S1)<Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1) OR (Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)<Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-2)
AND ma(MP(),n1,S1) - ma(MP(),n2,S1)=Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)),ma(MP(),n1,S1) - ma(MP(),n2,S1),0);
Green:=If(ma(MP(),n1,S1) - ma(MP(),n2,S1)>Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1) OR (Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)>Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-2)
AND ma(MP(),n1,S1) - ma(MP(),n2,S1)=Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)),ma(MP(),n1,S1) - ma(MP(),n2,S1),0);
{Awesome oscillator}
AOcrossoverBuy:= Green>0 and Ref(Green,-1)<0;
AOsaucerBuy:= Green>0 and Green> Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Green>0 and Ref(Red,-1)>0;
AOUnderlineBuy:= Green<0 and Green> Ref(Red,-1);
AOUnderlinesecondBuy:= Green<0 and Green> Ref(Green,-1) and Green> Ref(Green,-2) and Ref(Red,-3)<0;
AOcrossunderSell:= Red<0 and Ref(Red,-1)>0 ;
AOOverlineSell:= Red>0 and Red< Ref(Green,-1);
AOUnderlineSell:= Red<0 and Red> Ref(Green,-1);
AOsaucerSell:= Red<0 and Red< Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Red<0 and Ref(Green,-1)<0;

[name=DownMomentum; linestyle=Bar; width=4; color=Red;]
Red;
[name=UpMomentum; linestyle=Bar; width=4; color=Royal Blue;]
Green;

{Markers}
[name=Cb;linestyle=marker;marker=long;fontsize=6;Color=Green;textalign=below,center;tooltip="AOcrossoverBuy "]
AOcrossoverBuy;
[name=SauB;linestyle=marker;marker=long;colour=green;tooltip="AOsaucerBuy "]
AOsaucerBuy;
[name=Ub;linestyle=marker;marker=long;tooltip="AOUnderlineBuy"]
AOUnderlineBuy;
[name=Ub2;linestyle=marker;marker=long;tooltip="AOUnderlinesecondBuy"]
AOUnderlinesecondBuy;

[name=Cs;linestyle=marker;marker=short;Color=Red;textalign=Above,center;tooltip="AOcrossunderSell"]
AOcrossunderSell;
[name=s2;linestyle=marker;marker=short;tooltip="AOOverlineSell"]
AOOverlineSell;
[name=US;linestyle=marker;marker=short;tooltip="AOUnderlineSell"]
AOUnderlineSell;
[name=SauS;linestyle=marker;marker=short;tooltip="AOsaucerSell "]

AOsaucerSell;

Independent Indicator 6

{Chaos AO with variable inputs}
S1 := inputma("Method",SIMPLE);
n1 := input("Shorter moving average",5,1);
n2 := input("Longer moving average",34,1);
methodroc := inputroc("Mode");
Red:=If(ma(MP(),n1,S1) - ma(MP(),n2,S1)<Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1) OR (Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)<Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-2)
AND ma(MP(),n1,S1) - ma(MP(),n2,S1)=Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)),ma(MP(),n1,S1) - ma(MP(),n2,S1),0);
Green:=If(ma(MP(),n1,S1) - ma(MP(),n2,S1)>Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1) OR (Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)>Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-2)
AND ma(MP(),n1,S1) - ma(MP(),n2,S1)=Ref(ma(MP(),n1,S1) - ma(MP(),n2,S1),-1)),ma(MP(),n1,S1) - ma(MP(),n2,S1),0);
{Awesome oscillator}
AOcrossoverBuy:= Green>0 and Ref(Green,-1)<0;
AOsaucerBuy:= Green>0 and Green> Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Green>0 and Ref(Red,-1)>0;
AOUnderlineBuy:= Green<0 and Green> Ref(Red,-1);
AOUnderlinesecondBuy:= Green<0 and Green> Ref(Green,-1) and Green> Ref(Green,-2) and Ref(Red,-3)<0;
AOcrossunderSell:= Red<0 and Ref(Red,-1)>0 ;
AOOverlineSell:= Red>0 and Red< Ref(Green,-1);
AOUnderlineSell:= Red<0 and Red> Ref(Green,-1);
AOsaucerSell:= Red<0 and Red< Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Red<0 and Ref(Green,-1)<0;

[name=DownMomentum; linestyle=Bar; width=4; color=Red;]
Red;
[name=UpMomentum; linestyle=Bar; width=4; color=Royal Blue;]
Green;

{Markers}
[name=Cb;linestyle=marker;marker=long;fontsize=6;Color=Green;textalign=below,center;tooltip="AOcrossoverBuy "]
AOcrossoverBuy;
[name=SauB;linestyle=marker;marker=long;colour=green;tooltip="AOsaucerBuy "]
AOsaucerBuy;
[name=Ub;linestyle=marker;marker=long;tooltip="AOUnderlineBuy"]
AOUnderlineBuy;
[name=Ub2;linestyle=marker;marker=long;tooltip="AOUnderlinesecondBuy"]
AOUnderlinesecondBuy;

[name=Cs;linestyle=marker;marker=short;Color=Red;textalign=Above,center;tooltip="AOcrossunderSell"]
AOcrossunderSell;
[name=s2;linestyle=marker;marker=short;tooltip="AOOverlineSell"]
AOOverlineSell;
[name=US;linestyle=marker;marker=short;tooltip="AOUnderlineSell"]
AOUnderlineSell;
[name=SauS;linestyle=marker;marker=short;tooltip="AOsaucerSell "]
AOsaucerSell;


Independent Indicator 7
{Chaos Zones }
{ Chaos Alligator CMD Developed Refer Chapter 7}
{ Plot as histogram }
green := If(ma(MP(),5,S) - ma(MP(),34,S)<Ref(ma(MP(),5,S) - ma(MP(),34,S),-1) OR (Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)<Ref(ma(MP(),5,S) - ma(MP(),34,S),-2)
AND ma(MP(),5,S) - ma(MP(),34,S)=Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)),ma(MP(),5,S) - ma(MP(),34,S),0);
green1 :=If(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S)<Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1) OR (Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1)<Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-2)
AND Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S)=Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1)),Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),0);
red :=If(ma(MP(),5,S) - ma(MP(),34,S)>Ref(ma(MP(),5,S) - ma(MP(),34,S),-1) OR (Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)>Ref(ma(MP(),5,S) - ma(MP(),34,S),-2)
AND ma(MP(),5,S) - ma(MP(),34,S)=Ref(ma(MP(),5,S) - ma(MP(),34,S),-1)),ma(MP(),5,S) - ma(MP(),34,S),0);
red1:= If(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S)>Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1) OR (Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1)>Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-2)
AND Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S)=Ref(Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),-1)),Fml("CMD Chaos AO") - ma(Fml("CMD Chaos AO"),5,S),0);
redtwo:=red and red1;
greentwo:=green and green1;
Greyone:=red and green1;
Greytwo:=red1 and green;

redtwo;
greentwo;
Greyone;
Greytwo;

Price chart indicators
Independent Indicator 8
method := inputma("Method",SIMPLE);
n := input("Longer Time period",14,1);

{Chaos AO with signals}
{ Chaos Awsome Oscillator - measures momentum CMD adapted to match Metastock indicator }
{ A very close approximation of MFI }
{ Plot as histogram }

{This is TRApldot but to save all the recoding called Pldot}
Pldot:=(((hist(h,0)+hist(Low,0)+hist(C,0))/3)+((hist(h,1)+hist(Low,1)+hist(C,1))/3))/2;
Red:=If(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD)<Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1) OR (Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1)<Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-2)
AND ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD)=Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1)),ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),0);
Green:=If(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD)>Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1) OR (Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1)>Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-2)
AND ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD)=Ref(ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),-1)),ma(PLDOT,1,METHOD) - ma(PLDOT,n,METHOD),0);
AOcrossoverBuy:= Green>0 and Ref(Green,-1)< 0;
AOsaucerBuy:= Green>0 and Green> Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Green>0 and Ref(Red,-1)>0;
AOUnderlineBuy:= Green<0 and Green> Ref(Red,-1);
AOUnderlinesecondBuy:= Green<0 and Green> Ref(Green,-1) and Green> Ref(Green,-2) and Ref(Red,-3)<0;
AOcrossunderSell:= Red<0 and Ref(Red,-1)>0 ;
AOOverlineSell:= Red>0 and Red< Ref(Green,-1);
AOUnderlineSell:= Red<0 and Red> Ref(Green,-1);
AOsaucerSell:= Red<0 and Red< Ref(Green,-1) and Ref(Green,-1)< Ref(Green,-2) or Red<0 and Ref(Green,-1)<0;
[target=Price; linestyle=PriceColor;]
[name=Slowing; color=Red; name=Slowing]
if(Red,1,undefined);
[name=Momentum; color=Royal Blue; name=Momentum]
if(Green,1,undefined);

Independent Indicator 9

{Chaos Fractals}
[description="Some Fractal Patterns showing the High or Low value instead of a marker."; citation= "'Fractal Pattern from Trading Chaos 2nd Ed, pp 137-138' or New Trading Dimensions pp 67 to 70";
author=Bill Williams & Justine Gregory-Williams and Bill Williams respectively; ]
[target=Price;]
High1a := Ref(HIGH,-3);
High1 := Ref(HIGH,-2);
High2 := Ref(HIGH,-1);
High3 := Ref(HIGH,0);
High4 := Ref(HIGH,1);
High5 := Ref(HIGH,2);
Low1a := Ref(LOW,-3);
Low1 := Ref(LOW,-2);
Low2 := Ref(LOW,-1);
Low3 := Ref(LOW,0);
Low4 := Ref(LOW,1);
Low5 := Ref(LOW,2);
FractalUp:= (High3 > High1)
AND (High3 > High2)
AND (High3 > High4)
AND (High3 > High5);
FractalUp1:= (High3 > High1a)
AND (High3 > High1)
AND (High3 = High2)
AND (High3 > High4)
AND (High3 > High5);
FractalU:=If(FractalUp OR FractalUp1,1,undefined);
FractalDown:= (Low3 < Low1)
AND (Low3 < Low2)
AND(Low3 < Low4)
AND (Low3 < Low5);
FractalDown1:= (Low3 < Low1a)
AND (Low3 < Low1)
AND (Low3 = Low2)
AND(Low3 < Low4)
AND (Low3 < Low5);

FractalD:=If(FractalDown OR FractalDown1,1,undefined);

HoldLevelPeriod := Input("Hold Level Period",15,1);
[linestyle=points; color=blue; width=5]
UpFractal:=If(FractalU, H*1.0000005,undefined);
FrU:=ValueWhen(1,UpFractal,UpFractal);
FrUb:=If(H < FrU and barssince(UpFractal)< HoldLevelPeriod, FrU,undefined);
FrUb;
{ Fractal Lows }
[color
=indian red]
DownFractal:=
If(FractalD, L*0.9999995,undefined);
FrD:=ValueWhen(1,DownFractal,DownFractal);
FrDb:=
If(L > FrD and barssince(DownFractal)<HoldLevelPeriod,FrD,undefined);
FrDb;
{ Markers }
[name
=HH; linestyle=marker; marker=type2]
SignalUp:=
If(Hist(FrUb,1) and H > FrU,FrU,undefined);
SignalUp;
[name
=LL; linestyle=marker; marker=type1]
SignalDown:=
If(Hist(FrDb,1) and L < FrD,FrD,undefined);
SignalDown;
[linestyle=Text; textalign=centre, Above,; color=Red]
if(FractalU, " " + h, undefined);
High;
[linestyle=Text; textalign=centre,Below; color=Green]
if(FractalD, "" + l, undefined);
Low;



Edited by cmacdon - 21 Jul 2019 at 5:51pm
BC User since June 2007
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz