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

Re: [amibroker] fractal signals



PureBytes Links

Trading Reference Links





X = Buy 
OR<FONT 
face=Verdana size=2> Sell;
Plot(C,<FONT 
face=Verdana color=#00008b size=2>"Prices"<FONT face=Verdana 
size=2>,<FONT face=Verdana color=#8b0000 
size=2>ValueWhen(X,<FONT 
face=Verdana color=#8b0000 size=2>IIf<FONT face=Verdana 
size=2>(Sell,<FONT face=Verdana color=#800080 
size=2>ColorRed,<FONT 
face=Verdana color=#800080 size=2>ColorGreen<FONT face=Verdana 
size=2>)) ,4<FONT 
face=Verdana size=2>);
-CS
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Yuki 
  Taga 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">ERKAN BISEVAC 
  Sent: Sunday, April 13, 2003 6:03 
PM
  Subject: Re: [amibroker] fractal 
  signals
  Hi ERKAN,Thank you very much.  I would like to 
  try to plot this in the pricechart, 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 pricebars in my 
  price chart?  (My price chart is already customized, so Ijust need to 
  amend it.)YukiMonday, 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> 
  ERKANEB> 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=1EB> ~~~~~~~~~~~~~~~~~~~~~~~~~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=0EB> I have found these signals to be quite useful for medium 
  and longerEB> term trending situations. Points are as follows: 1) this 
  is unlikelyEB> to ever *kill* you, as the signal will reverse long 
  before you die,EB> 2) take some reasonable profits at the first 
  opportunity, which willEB> 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 ofEB> keeping you in there, and lastly 4) if you 
  enter and price turns theEB> wrong way immediately but the signal does 
  not reverse, hold yourEB> position and then add to it when price turns 
  back in the direction ofEB> the signal.EB> I cannot stress 
  number 2 too strongly, as this will catch theEB> beginning of moves 
  that are not going beyond 4 or 5 more bars, ifEB> that. If you don't 
  take some profits, you will get whipsawed enoughEB> to dampen your 
  enthusiasm for this.EB> Yuki ^_^Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







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.