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

Re: rembuy.dll



PureBytes Links

Trading Reference Links

Al,

Thanks so much. I really appreciate all the help...great group of 
people on the list. A great program also.

Harold Harper
harold@xxxx

--- In amibroker@xxxx, "Avcinci" <avcinci@xxxx> wrote:
> Harold,
> 
> Here is an example code that uses rembuy.dll:
> 
> BuyCond=<your buy conditions>; //whatever rules you want as your 
entry setup
> tm=Optimize("tm",4,2,5,0.5); //ATR multiplier for trailing stop
> im=Optimize("im",2.5,1,4,0.5); //ATR multiplier for initial 
protective stop
> pds=Optimize("pds",20,10,26,3); //ATR periods
> Buy=Ref(BuyCond,-1); //entry at open one day after buy signal
> Buy=Hold(Buy==0,2) AND Buy;//convert to one bar peak
> EP=Open;//entry price is the open on the day of the buy
> Profit=EP*1000000000000000000000;//big number to eliminate profit 
target
> Stoploss=ValueWhen(Buy,O-im*ATR(pds));//hard initial stoploss
> Trailstop=H-tm*ATR(pds);//the trailing stop
> Capital = 100000;//starting equity
> Risk=0.01*Capital;//risk per trade
> PositionSize=Risk/(im*ATR(pds))*EP;//position size code that risks 
a maximum of 1% of equity
> Bars=-1;//eliminates a timed exit (a positive number means you 
have a timed exit)
> scRemBuyTrail(Buy,Close,EP,Stoploss,Profit,Trailstop,Bars);//the 
call of the rembuy.dll
> Buy=Buy;//ensures buy is an array
> Sell=Sell;//ensures sell is an array
> BuyPrice=EP;
> SellPrice=Open;
> Short=0;Cover=0;
> EP=ValueWhen(Buy,EP);//for plotting purposes
> IStop=ValueWhen(Buy,Stoploss);//for plotting purposes
> TStop=HighestSince(Buy,Trailstop);//for plotting purposes
> 
> So, the scRemBuyTrail is the key. It calls the functions within 
the dll, and you have to have all the factors shown within 
parentheses, even though you might not utilize all of them. In the 
example above, there is no profit target and no timed exit. If you 
choose to use the open rather than the close as your exit, change 
the Close to Open within the parentheses in the call function. 
> 
> That's about it. I'm sure Stephane will come up with other and 
better explanations, since he wrote the program. Hope this helps you 
get started.
> 
> Al Venosa
> 
> ----- Original Message ----- 
> From: Harold T. Harper 
> To: amibroker@xxxx 
> Sent: Thursday, October 10, 2002 4:15 PM
> Subject: RE: [amibroker] Re: rembuy.dll
> 
> 
> Stephane,
> 
> Thanks in advance for your help. I really appreciate it.
> 
> Also, your help file is fine for most, I'm sure--unfortunately, 
when it
> comes to programming, I'm a dunce.
> 
> Thanks, Stephane.
> 
> Harold Harper
> harold@xxxx
> 
> -----Original Message-----
> From: Stephane Carrasset [mailto:nenapacwanfr@x...] 
> Sent: Thursday, October 10, 2002 2:51 PM
> To: amibroker@xxxx
> Subject: [amibroker] Re: rembuy.dll
> 
> 
> Harold,
> 
> for several reasons ( profession.) the only thing I can do is to 
> give an example with explanations. because of my good 
franglish !!!, 
> it takes too much time to write better help files.
> i'll write an example tonite in a few hours, just before going 
to bed
> 
> 
> stephane
> 
> 
> > Does anyone have a 'cheat sheet' of sorts for the rembuy.dll.
> > 
> > I'm looking for a list of functions available, syntax, 
examples,
> etc. 
> > I've looked at the help file in the 3rd party directory and am 
a
> > little confused.
> > 
> > The dll looks to be, however, exactly what I need.
> > 
> > Any help would be greatly appreciated.
> > 
> > Thanks!
> > 
> > Harold Harper
> > harold@xxxx
> 
> 
> 
> Post AmiQuote-related messages ONLY to: amiquote@xxxx 
> (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
> http://docs.yahoo.com/info/terms/ 
> 
> 
> 
> 
> Yahoo! Groups Sponsor 
> ADVERTISEMENT
> 
> 
> 
> 
> Post AmiQuote-related messages ONLY to: amiquote@xxxx 
> (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.