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

Re: [amibroker] fractal signals



PureBytes Links

Trading Reference Links

Hi ERKAN,

Thank you very much.  I would like to try to plot this in the price
chart, if possible, thusly:

Price bar becomes green on the day of a 'buy', and stays green until
'short', at which time it becomes red and stays red until the next
'buy'.

Does anyone know how to write this so that it will color my price
bars in my price chart?  (My price chart is already customized, so I
just need to amend it.)

Yuki

Monday, April 14, 2003, 3:14:13 AM, you wrote:




EB> F1=ValueWhen(H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND 

EB> Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2),1);

EB> 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);

EB> A=Cross(H,F1);

EB> b=Cross(F2,L);

EB> Buy=BarsSince(A)<BarsSince(b);

EB> Short =BarsSince(A)>BarsSince(b);

EB> Cover=Buy;

EB> Sell=Short;

EB> Buy=ExRem(Buy,Sell);

EB> Sell=ExRem(Sell,Buy);

EB> Cover=ExRem(Cover,Short);

EB> Short=ExRem(Short,Cover);

 

 

EB> ERKAN


EB> Yuki Taga <yukitaga@xxxxxxxxxxxxx> wrote:Can anyone put these MS formulae into AB language?

EB> Buy =

EB> 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));

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

EB> state:=If(BarsSince(a)
EB> state=1

EB> ~~~~~~~~~~~~~~~~~~~~~~~~~

EB> Short =

EB> 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));

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

EB> state:=If(BarsSince(a)
EB> state=0

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

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

EB> Yuki ^_^


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/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/