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

RE: [amibroker] Price Oscillator



PureBytes Links

Trading Reference Links




<SPAN 
class=542590701-01022004>Yes, this is an exit strategy only. The idea is, once 
you enter, if you don't keep making profits, you're gone. Make some simple buy 
signal, then call this and plot the Exit line; you'll see what it's 
doing.
<SPAN 
class=542590701-01022004> 
<SPAN 
class=542590701-01022004>It was built for EOD data. It might well be useful 
intraday too, since the basic principle seems generally sound, but I haven't 
looked at that at all.
<SPAN 
class=542590701-01022004> 
<SPAN 
class=542590701-01022004>Dave
<BLOCKQUOTE 
>Dave,Thank 
  you for your contribution....just to clarify...this is just an 
  Exitstrategy...also, my research is based on EOD data....is that ok for 
  thisExit strategy ?What I can tell you right now, with the entry , 
  exits and stops that are inmy initial testing... initial test seem to 
  point toexploitable PROFITS...ThanksAnthony----- 
  Original Message ----- From: "Dave Merrill"To: 
  <amibroker@xxxxxxxxxxxxxxx>Sent: Saturday, January 31, 2004 3:38 
  PMSubject: RE: [amibroker] Entry's , exits , stops> > I 
  am in the process of ( doing / performing )> > research on a Trading 
  Theory. Initial results prove promising.> >> > I am not 
  asking for complete trading systems.... but would> > like anyone in 
  the group who would like to contribute...their :> > Entry's> 
  > Exits> > Stops ( applystops in afl )> >> > 
  Thank you in Advance> > Anthony>> Surprised nobody's 
  chimed in here yet, unless they're doing so in private.> I'm not sure 
  what your actual project is, but keep us posted, especiallyif> 
  profitable things happen (:-).>> Here's an exit I've been 
  playing with. The basic idea is sort of similarto> SAR, but more 
  Fred Flintstone. Basically, it demands that price go in your> favor by 
  the requested percentage every bar since entry, otherwise itexits.> 
  InitialLongExit and InitialShortExit set how much slop to start with,> 
  typically some percentage or ATR multiple off entry price.>> 
  Hope this is useful, to you or to someone. Comments, corrections, or 
  other> ideas are of course welcome.>> 
  Dave>>> Here's the actual code; example calling code and 
  notes follow:>> ------------------> function 
  fExitExponential(Price, InitialLongExit, InitialShortExit,LongPct,> 
  ShortPct, BuyDelay, ShortDelay) {> LastDir = 0;> LongFactor = 1 
  + (LongPct / 100);> ShortFactor = 1 - (ShortPct / 100);> ex = 
  Null;> BuyDelayed = Ref(Buy, -BuyDelay);> ShortDelayed = 
  Ref(Short, -ShortDelay);> for(i = 0; i <= BarCount - 1; i++) 
  {> if(BuyDelayed[i] AND (LastDir != 1)) {> LastDir = 1;> 
  ex[i] = InitialLongExit[i];> } else if(ShortDelayed[i] AND (LastDir != 
  -1)) {> LastDir = -1;> ex[i] = InitialShortExit[i];> } 
  else if(LastDir == 1) {> ex[i] = ex[i - 1] * LongFactor;> 
  if(Price[i] < ex[i]) {> LastDir = 0;> }> } else 
  if(LastDir == -1) {> ex[i] = ex[i - 1] * ShortFactor;> 
  if(Price[i] > ex[i]) {> LastDir = 0;> }> }> 
  }> return ex;> }> ------------------>> 
  Here's an example of how it'd typically be set up and called:>> 
  InitialSlop = ATR(10) * 2;> Price = O; // for trading at Open> 
  PctChange = 1.5;> BuyDelay = Status("BuyDelay");> SellDelay = 
  Status("SellDelay");> Exit = fExitExponential(Price, Price - 
  InitialSlop, Price + InitialSlop,> PctChange, PctChange, BuyDelay, 
  ShortDelay);> Sell = Cross(Exit, Price);> Cover = Cross(Price, 
  Exit);>> NOTES:>> - Since this works off Buy and 
  Sell signals, you need to generate them> first, then call 
  it.>> - The exit signal is null when you're out of the market. 
  As it stands, if> there's a entry signal on the same day as an exit, it 
  won't be null whereit> should be, but the exits are still 
  correct.


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.