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

[Metastockusers] Re: Help with WriteIF and Expert



PureBytes Links

Trading Reference Links

Dusant,

I am having a problem with the code sample from you. Remember, 
my "Enter Long" and "Enter Short" are working as planned. It's 
the "Exit Long" and "Exit Short" that's the problem.

So I'm not sure about your code. Also, your "M:=" is giving me 
problems.

Could you elaborate on how to write the Exit Long?

Thanks much,

- larryTAKOUT@xxxxxxxxxx


--------------------------------------------------

--- In Metastockusers@xxxxxxxxxxxxxxx, "Dusant@xxxx" <dusant@xxxx> 
wrote:
> Larry,
> >From a cursory glance at the conditions for the writeif(), I think 
you can use this method.
> writeif(
> M:=
> Highest:= max(Mov(C,50,S), Mov(C,100,E);\
> max(highest, Mov(C,150,E))\
> cross(c, M),)),"Enter Long. ")
> and the reverse for shorts.
> Tell us if it works.
> Dusant
> Chief Architect
> www.candlestrength.com
>   ----- Original Message ----- 
>   From: lseldin 
>   To: Metastockusers@xxxxxxxxxxxxxxx 
>   Sent: Wednesday, February 11, 2004 22:40 PM
>   Subject: [Metastockusers] Help with WriteIF and Expert
> 
> 
>   I am having a problem with my Commentary on an Expert that I have.
> 
>   The Enter Long and Enter Short work well. 
> 
>   **** However, my Exit Long and Exit Short are not working well.
> 
> 
>   The idea is to go long when close is above all 3 moving averages
>   and to go short when close is less than all 3 moving averages.
> 
>   Also to Exit Long any position, when these conditions are not 
met. 
>   Meaning if I am in a long position and the moving average goes 
below 
>   one of these MA, then exit.
> 
>   Also to Exit Short any position, when these conditions are not 
met. 
>   Meaning if I am in a short position and the moving average goes 
above 
>   one of these MA, then exit.
> 
> 
>   Writeif(C>Max(Max(Mov(C,50,S),Mov(C,100,E)), Mov(C,150,E)),"Enter 
>   Long. ")\
>   Writeif(C<Min(Min(Mov(C,50,S),Mov(C,100,E)), Mov(C,150,E)),"Enter 
>   Short. ")\
> 
>   **** These are the 2 problem statements:
> 
>   Writeif(C<Max(Max(Mov(C,50,S),Mov(C,100,E)), Mov(C,150,E)),"Exit 
>   Long. ")\
>   Writeif(C>Min(Min(Mov(C,50,S),Mov(C,100,E)), Mov(C,150,E)),"Exit 
>   Short. ")\
> 
>   Thanks much,
> 
>   larryTAKOUT@xxxx



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Send the freshest Valentine's flowers with a FREE vase from only $29.99!
Shipped direct from the grower with a 7 day freshness guarantee and prices so low you save 30-55% off retail!
http://us.click.yahoo.com/_iAw9B/xdlHAA/3jkFAA/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/