PureBytes Links
Trading Reference Links
|
valuewhen wo.rks best
Target = Valuewhen(Buy, BuyPrice) + Profit ;
On 5/15/05, Andre <SGSTAndre@xxxxxxx> wrote:
> I am a newbie. I am stuck. Once I buy I want to set a sales price
> equal to
> "purchase price + some formula()".
>
> My problem is that I can't figure out how to reference my purchase
> price once 'buy' is activated. I've found the reserved
> array "BuyPrice". So if I want to buy at yesterday's high plus a
> "fudge-factor" alpha, I say:
>
> BuyPrice = Ref(High,-1)+ Alpha ;
> Buy = Cross(High, BuyPrice) ;
>
> Now, if I say:
>
> Target = BuyPrice + Profit ;
>
> This is not going to work, as BuyPrice will be an array changing
> every day. I need it to freeze on the day I buy and until I sell.
> Isn't there a logical parameter called LONG or somthing?
>
> I tried typing
>
> if (Buy ==1) {BoughtPrice = BuyPrice} ;
>
> but now I am told that Buy is not a Boolean expression.
>
> How do I get stuff done only AFTER a Buy is executed and before a
> SELL??
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
--
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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:
http://docs.yahoo.com/info/terms/
|