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

Re: [amibroker] Re: AmiBroker 4.52.0 BETA released



PureBytes Links

Trading Reference Links




Not 
tested!! 

UpDay = ROC<FONT 
size=2>(C,1<FONT 
size=2>)>0;
DnDay = ROC<FONT 
size=2>(C,1<FONT 
size=2>)<0;
TwoUpDays = IIf(UpDay 
AND Ref<FONT 
size=2>(UpDay,-1<FONT 
size=2>),1,<FONT 
color=#ff00ff size=2>0);
TwoDnDays = IIf(DnDay 
AND Ref<FONT 
size=2>(DnDay,-1<FONT 
size=2>),1,<FONT 
color=#ff00ff size=2>0);
TwoDayFlip = Flip<FONT 
size=2>(TwoUpDays, TwoDnDays);
Condition = IIf<FONT 
size=2>(TwoDayFlip, 1<FONT 
size=2>,-1<FONT 
size=2>);
Plot(Close,<FONT color=#ff00ff 
size=2>"Close",<FONT color=#ff00ff 
size=2>1,128<FONT 
size=2>);
Plot(Condition ,<FONT color=#ff00ff 
size=2>"TwoDayFlip",<FONT color=#ff00ff 
size=2>9,styleArea);
 
<FONT face=Arial 
color=#0000ff>herman

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Phil 
  [mailto:KDSnyder96@xxxxxxxxxxxxxx]Sent: Sunday, March 14, 2004 8:45 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  Some Help PleaseSorry, I guess my question was not 
  very clear. Let me try again.After I get two up days in a row 
  I want the plot to stay at +1 until I get two down days in a row, then I 
  want the plot to stay at -1 until I get two up days in a row, then I want 
  to plot ot stay at +1 again until I get two down days in a row.....and so 
  on. Thanx,Phil--- In 
  amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> 
  wrote:> Phil,> > does this help.> > 
  Plot(IIf(O5updn > -1,1,-1) ,"o5updn",colorRed,styleLine);> > 
  > > Anthony> > ----- Original Message ----- 
  > From: "Phil" <KDSnyder96@xxxx>> To: 
  <amibroker@xxxxxxxxxxxxxxx>> Sent: Sunday, March 14, 2004 7:57 
  PM> Subject: [amibroker] Some Help Please> > > 
  > For those old pro's please bear with what is probably an easy> 
  > question from a first timer.> >> > Here is the code I 
  am working with (simple Full Stoch two days in> > the up direction 
  creates a "Buy" signal and the convers for a "Sell"> > 
  signal:> >> > O5Pds1 = Optimize("O5pds1", 16,   
  5,  20, 1);> > O5Pds2 = Optimize("O5pds2",  5,   
  2,  10, 1);> > O5Pds3 = Optimize("O5pds3",  8,   
  2,  10, 1);> >> > pds = O5Pds1; /*Periods */> 
  > slw = O5Pds2; /*Slowing for Full Stoch%K*/> > slwd = O5Pds3; 
  /*Slowing for Full Stoch%D*/> >> > FSK = 
  100*(C-LLV(L,pds))/(HHV(H,pds)-LLV(L,pds)); // FASTSTOCHK> > FLSK = 
  MA( FSK, slw ); // FULLSTOCHK> > FLSD = MA( FLSK, slwd ); // 
  FULLSTOCHD> >> > His=FLSK;> >> > O5Up 
  = IIf(Ref(His,-3)>=Ref(His,-2) AND Ref(His,-2)<=Ref(His,-1) 
  AND> > Ref(His,-1)<His, 1,0);> > O5Dn = 
  IIf(Ref(His,-3)<=Ref(His,-2) AND Ref(His,-2)>=Ref(His,-1) 
  AND> > Ref(His,-1)>His,-1,0);> >> > 
  O5UpDn = O5Up + O5Dn> >> > Buy =  O5Up > 
  0;> > Sell = O5Dn < 0;> > Short = Sell;> > 
  Cover = Buy;> >> > What I want to do is to be able to plot 
  O5UpDn.  But!> >> > The problem I have now is I get a 
  spike to "1" when I have two> > updays in a row on the Full 
  Stocastic, then the value goes to "0" as> > soon as there are 
  not two up days in a row.> >> > Ditto on the converse with 
  two down days in a row.> >> > So if:> >> 
  > Day 1 is up on Full Sto, then O5Up = 0> > Day 2 is up on Full 
  Sto, then O5Up = 1> > Day 3 is up on Full Sto, then O5Up = 1> 
  > Day 4 is down on Full Sto, then O5Up = 0> > Day 5 is up on Full 
  Sto, then O5Up = 0> > Day 6 is up on Full Sto, then O5Up = 1> 
  >> > How do I hold the "1" for a plot?> >> 
  >> > Thanx,> >> > Phil> >> 
  >> >> > Send BUG REPORTS to bugs@xxxx> > Send 
  SUGGESTIONS to suggest@xxxx> > 
  -----------------------------------------> > 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> 
  > Yahoo! Groups Links> >> >> >> 
  >> >> > > ---> Outgoing mail is 
  certified Virus Free.> Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).> Version: 
  6.0.614 / Virus Database: 393 - Release Date: 
  3/5/2004Send 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 
  


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








Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.