Page 1 of 1

MO_CrashZone for AmiBroker

Posted: Sun Jul 08, 2012 6:49 am
by frang0nve
Hello,

This is my code for AmiBroker displaying MO Weekly CrashZone.

[font=Courier New]dow = DayOfWeek();
newWeek = dow < Ref( dow, -1);
W0High = HighestSince( newWeek, High);
W0Low = LowestSince( newWeek, Low);
W0Range = W0High-W0Low;
BarsInWeek0=BarsSince(newWeek);

W1Range=Ref(W0Range,-BarsInWeek0-1);
W2Range=Ref(W1Range,-BarsInWeek0-1);
W3Range=Ref(W2Range,-BarsInWeek0-1);

MedianRange=Min(Min((Max(W1Range,W2Range)),(Max(W1Range,W3Range))),Max(W2Range,W3Range));


LTarget1=W0Low+MedianRange*4/6;
LTarget2=W0Low+MedianRange*5/6;
LTarget3=W0Low+MedianRange*7/6;
LTarget4=W0Low+MedianRange*8/6;
STarget1=W0High-MedianRange*4/6;
STarget2=W0High-MedianRange*5/6;
STarget3=W0High-MedianRange*7/6;
STarget4=W0High-MedianRange*8/6;

PlotOHLC(LTarget2,LTarget2,LTarget1,LTarget1,"LT1Area",colorGreen,styleCloud);
PlotOHLC(LTarget4,LTarget4,LTarget3,LTarget3,"LT2Area",colorGreen,styleCloud);
PlotOHLC(STarget1,STarget1,STarget2,STarget2,"ST1Area",colorRed,styleCloud);
PlotOHLC(STarget3,STarget3,STarget4,STarget4,"ST2Area",colorRed,styleCloud)
;[/font]




Thanks to MO and Marcin Gorzynski (Amibroker.com Technical Support)

Cheers

Francisco

Posted: Sun Jul 08, 2012 8:45 pm
by ahmedalhoseny
Fantastic idea and i wish TRO to update the cash indicator to be drawn like your indicator

Posted: Sun Jul 08, 2012 9:38 pm
by frang0nve
I've updated the code in the first post. Please copy again.

Cheers

Francisco

Posted: Mon Jul 09, 2012 3:30 am
by frang0nve
Ooops. Regresion bug. Please copy code in first post again.

Cheers

Francisco

Posted: Sun Oct 21, 2012 6:47 pm
by ahmedalhoseny
Hello Francisco
Do you have amibroker versions of these indicators

Blubbb_MightyZones
TRO_ATR_LINES
II_SupDem


Thanks in advance