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

RE: [amibroker] Re: Event Date



PureBytes Links

Trading Reference Links


The 
following is an excerpt from my trading system which uses Bailout exit, i.e. 
exit on the Nth profitable opening.
<SPAN 
class=360503000-13032001> 
<SPAN 
class=360503000-13032001> 
lgBailoutOffset =2;   // 
Exit on the Nth profitable open (for long) - Switch it off for 
long-term!bailOutOffsetAbs = 
0.1; // Consider profitable open if it's better then entry price plus/minusthis 
offset
 
<FONT face=Arial color=#0000ff 
size=2>lgentrprc= ...; // Entry 
pricelgentry = cross (high,  lgentrprc);
succlgexit = IIF ( cum (lgentry) > 
0, cross ( barssince( lgentry ) >= lgBailoutOffset AND open > valuewhen 
(lgentry, lgentrprc) + bailOutOffsetAbs, 0), 0); 
// Use cum(lgentry)> 0 to avoid {EMPTY} eintries

<FONT face=Tahoma 
size=2>-----Original Message-----From: jacklweinberg@xxxxxx 
[mailto:jacklweinberg@xxxx]Sent: Monday, March 12, 2001 1:13 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]Re: 
Event DateTomasz,Can the technique shown in the 
following example be used to 'exit' a trade after N days?--- In 
amibroker@xxxx, "Tomasz Janeczko" <tj@xxxx> wrote:> Hello 
Barry,> > Use the following formula to find the all-time highest 
and display its value and date:> > alltimehigh = LastValue( 
Highest( high ) );> alltimehighbar = ValueWhen( high == alltimehigh, 
Cum(1) );> > alltimeyear = ValueWhen( high == alltimehigh, 
Year() );> alltimemonth = ValueWhen( high == alltimehigh, Month() 
);> alltimeday = ValueWhen( high == alltimehigh,  Day());> 
> "All time highest was " + WriteVal( alltimehigh );> "on the " 
+ WriteVal( alltimeyear, 1 ) + "." + WriteVal( alltimemonth, 1 ) + "." + 
WriteVal( alltimeday, 1 );> > /* Draw also a vuy arrow on 
highest day */> buy = high == alltimehigh ;> sell =0;> 
> > Best regards,> Tomasz Janeczko> 
===============> AmiBroker - the comprehensive share manager.> 
http://www.amibroker.com> 
> > ----- Original Message ----- > From: 
<bholt@xxxx>> To: <amibroker@xxxx>> Sent: Sunday, 
March 11, 2001 5:26 AM> Subject: [amibroker] Event Date> 
> > > Hi,> > > > Could anybody please 
advise how to write the date of an event in Guru > > section - 
i.e. for the highest ever value of a stock.> > > > I would 
like the commentary to say "The highest ever value was > > $xxx.xx 
on the dd.mm.yyyy.> > > > Thanks again in advance.> 
> > > Thanks also to Richard for your explanation of how to 
combine > > tickers - it worked well.> > > > 
> > > >  > > > > Your use of 
Yahoo! Groups is subject to <A 
href="">http://docs.yahoo.com/info/terms/ 
> > > >Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.