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

Re: [amibroker] Profit Taking?



PureBytes Links

Trading Reference Links

jj amibroker would need live data feed to do that
the problem you describe is called slippage you may need to calculate it
when you do your forecast
eg xyz buy at 10,000 at 1.00 = $ 10,000
brokage $60.00 both ways $ 60.00
slippage 2% total on entry and exit $ 200.00
cost of trade $10,260
break even at 1.026
profit target ?? 1.03
return on trade .38 %
profit $40.00

Not that you would make the trade if 1.03 was your projected profit point
with 2% slippage ..

Thats how I TRY to treat every trade..
before the trade is made determine
S/L (stop loss)
B/E (break even)
project profit point .

hope this help


----- Original Message -----
From: <jjames@xxxx>
To: <amibroker@xxxxxxxxxxx>
Sent: Friday, December 29, 2000 12:32 PM
Subject: [amibroker] Profit Taking?


> Hello!
>
> I have a question about profit taking. Below is a piece of code
> written for profit taking (Message# 637)
>
> 3. Sell after achieving X% profit:
>
> proftarget = 10; /* here you put percentage profit target */
>
> buy = cross( macd(), 0 );
> buyprice = valuewhen( buy, close );
>
> sell = cross( 100*(close - buyprice)/buyprice, proftarget );
>
>
> This works fine, if you plan to sell at the close of the day, not at
> the point (intraday) that the profit target was meet.
>
> My question is this: Is there a way to have AmiBroker set the sell
> price at the profit level, instead of the close, high, low, etc. of
> the day? For example if I buy at the close when XYZ = 100, and
> profit level is 3%, I want to sell at 103. If the next day the high
> of the day was higher than 103 (say 105), but the close was 102,
> AmiBroker sells me at 102, NOT 103 (my intended profit taking level).
>
> I hope I have not confused anyone with this question. Any help would
> be greatly apprciated! BTW, I love this software!!!
>
> Regards,
>
> Jared James
> jjames@xxxx
>
>
>
>
>
>