PureBytes Links
Trading Reference Links
|
Eric (and Chris),
I think you can solve your problem coding the exit this way:
open > valuewhen(1,close < bbandbot(c,10,s,2) AND
Ref(C,-1)>Ref(bbandbot(c,10,s,2),-1),close)
heitor
--- In Metastockusers@xxxxxxxxxxxxxxx, "Eric and Chris"
<ericandchristy@xxxx> wrote:
>
> Hello,
>
> I am trying to code in my exit the first profitable exit after entry.
> My entry is simple close < bbandbot(c,10,s,2) (buy on close). I want
> to exit on the first profitable open after that entry so I use :
>
> open > valuewhen(1,close < bbandbot(c,10,s,2),close)
>
> and this works most of the time. However, when there are 2
> consecutive closes below the lower bollinger band and it opens below
> the entry then it exits on the open if the close of the 2nd bar is
> below the lower bollinger band. Which obviously isn't a profitable
> opening.
>
> I tried to use a simple if() statement but it will only let me put
> data arrays in it and not functions.
>
> Help
>
> Thanks
> Eric
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|