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

Re: [amibroker] tj's pyramid



PureBytes Links

Trading Reference Links

Anthony, Rick, Steve

I wrote this sample code for Steve just to show very simple 
"emulation" of pyramiding in AFL. The simplicity was needed to show basic idea
behind this approach (selling one position and opening another with bigger position size).

I wrote already several times that pyramiding is not directly supported
and that's why an individual approach is needed when you want to write
a pyramiding formula. 

Tell me exactly what kind of system you want to code and I will provide
you with the solution.


Best regards,
Tomasz Janeczko
amibroker.com

(PS. Please note that due to the fact that commissions are taken for each trade this emulation
takes commissions too many times. - but you can turn off commissions completely)

----- Original Message ----- 
From: "Anthony Faragasso" <ajf1111@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, July 17, 2002 2:57 PM
Subject: Re: [amibroker] tj's pyramid


> Hello Rick,
> 
> Although I agree with concerning a convienent way to Pyramid our
> positions during positive Profit %, would the following work.
> 
> BuyCond = "your initial buy cond to enter the market";//DayOfWeek() ==
> 1;
> Buy2Cond = Barssince(buycond)==3 and "some other confirming buy cond,
> like Profit accumulated from entry day ";//DayOfWeek() == 3; // pyramid
> 
> Just some thought.
> 
> Anthony
> 
> Rick Parsons wrote:
> 
> > This is a starting point. However I am sure very few always buy on
> > Monday and pyramid on Wednesday each and every time. We need some way
> > to pyramid 3 days after a buy, not 3 days after Monday.Thanks, Rick
> >
> > -----Original Message-----
> > From: sidleysh [mailto:steves@x...]
> > Sent: Wednesday, July 17, 2002 4:54 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] tj's pyramid
> >
> > thought y'all would be interested in TJ's sample pyramid
> > code.
> >
> > Hello,
> >
> > Here is a simple sample of pyramiding "emulation":
> >
> > // the example system buys on monday, wednesday (increasing
> > pos)
> > // and sells on friday
> >
> > BuyCond = DayOfWeek() == 1;
> > Buy2Cond = DayOfWeek() == 3; // pyramid
> >
> > Sell = DayOfWeek()==5;
> >
> > Buy = BuyCond OR Buy2Cond;
> > PositionSize = IIf( Buy2Cond, 2000, 1000 ); // 1000 is first
> > trade
> > 2000 is pyramided
> > Sell = Sell OR Buy2Cond;
> >
> > /////////////////
> > Please set trade delays to zero in the settings page.
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> >
> >
> > Yahoo! Groups Sponsor
> ADVERTISEMENT
> 
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>