MO_CrashZone for AmiBroker

Moderator: moderators

frang0nve
rank: 150+ posts
rank: 150+ posts
Posts: 199
Joined: Thu Apr 09, 2009 7:57 pm
Reputation: 0
Gender: Male

MO_CrashZone for AmiBroker

Postby frang0nve » Sun Jul 08, 2012 6:49 am

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
Last edited by frang0nve on Mon Jul 09, 2012 3:23 am, edited 2 times in total.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

ahmedalhoseny
rank: 50+ posts
rank: 50+ posts
Posts: 111
Joined: Sat Dec 31, 2011 7:28 pm
Reputation: 0
Gender: Male
Contact:

Postby ahmedalhoseny » Sun Jul 08, 2012 8:45 pm

Fantastic idea and i wish TRO to update the cash indicator to be drawn like your indicator

frang0nve
rank: 150+ posts
rank: 150+ posts
Posts: 199
Joined: Thu Apr 09, 2009 7:57 pm
Reputation: 0
Gender: Male

Postby frang0nve » Sun Jul 08, 2012 9:38 pm

I've updated the code in the first post. Please copy again.

Cheers

Francisco

frang0nve
rank: 150+ posts
rank: 150+ posts
Posts: 199
Joined: Thu Apr 09, 2009 7:57 pm
Reputation: 0
Gender: Male

Postby frang0nve » Mon Jul 09, 2012 3:30 am

Ooops. Regresion bug. Please copy code in first post again.

Cheers

Francisco

ahmedalhoseny
rank: 50+ posts
rank: 50+ posts
Posts: 111
Joined: Sat Dec 31, 2011 7:28 pm
Reputation: 0
Gender: Male
Contact:

Postby ahmedalhoseny » Sun Oct 21, 2012 6:47 pm

Hello Francisco
Do you have amibroker versions of these indicators

Blubbb_MightyZones
TRO_ATR_LINES
II_SupDem


Thanks in advance

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “AmiBroker”