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

Re: [amibroker] fractal signals



PureBytes Links

Trading Reference Links



F1=ValueWhen(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),1);
F2=ValueWhen(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),1);
A=Cross(H,F1);
b=Cross(F2,L);
Buy=BarsSince(A)<BarsSince(b);
Short =BarsSince(A)>BarsSince(b);
Cover=Buy;
Sell=Short;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Cover=ExRem(Cover,Short);
Short=ExRem(Short,Cover);
 
 
ERKAN
Yuki Taga <yukitaga@xxxxxxxxxxxxx> wrote:
Can anyone put these MS formulae into AB language?Buy =F1:=ValueWhen(1,HF2:=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)state=1~~~~~~~~~~~~~~~~~~~~~~~~~Short =F1:=ValueWhen(1,HF2:=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)state=0I have found these signals to be quite useful for medium and longerterm trending situations. Points are as follows: 1) this is unlikelyto ever *kill* you, as the signal will reverse long before you die,2) take some reasonable profits at the first opportunity, which willprotect 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 ofkeeping you in there, and lastly 4) if you enter and price turns thewrong way immediately but the signal does not reverse, hold yourposition and then add to it when price turns back in the direction ofthe signal.I cannot stress number 2 too strongly, as this will catch thebeginning of moves that are not going beyond 4 or 5 more bars, ifthat. If you don't take some profits, you will get whipsawed enoughto 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@xxxxxxxxxxxxxSend 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/ Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more






Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.