[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] fractal signals



PureBytes Links

Trading Reference Links

Can anyone put these MS formulae into AB language?

Buy =

F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));
F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));

a:=Cross(H,F1);
b:=Cross(F2,L);

state:=If(BarsSince(a)<BarsSince(b),1,0);

state=1

~~~~~~~~~~~~~~~~~~~~~~~~~

Short =

F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));
F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));

a:=Cross(H,F1);
b:=Cross(F2,L);

state:=If(BarsSince(a)<BarsSince(b),1,0);

state=0

I have found these signals to be quite useful for medium and longer
term trending situations.  Points are as follows: 1) this is unlikely
to ever *kill* you, as the signal will reverse long before you die,
2) take some reasonable profits at the first opportunity, which will
protect you if the trend does not turn out to be going anywhere, 3)
if a trend does get established, this does a pretty good job of
keeping you in there, and lastly 4) if you enter and price turns the
wrong way immediately but the signal does not reverse, hold your
position and then add to it when price turns back in the direction of
the signal.

I cannot stress number 2 too strongly, as this will catch the
beginning of moves that are not going beyond 4 or 5 more bars, if
that.  If you don't take some profits, you will get whipsawed enough
to dampen your enthusiasm for this.

Yuki ^_^


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/