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

Re: [EquisMetaStock Group] TRAILING STOP LOSS



PureBytes Links

Trading Reference Links

Thanks for the suggestion but
X := Max( Ref(X,-1), Y )
does not provide the solution
 
and
X := Max( PREV, Y )
gives the all the time high so far as the trailing stop loss level for calculation.
Thus each trade gets stopped out on the next bar.
It does not reset for every long or short position.
 
 
Also - i want to program this condition - can someone help pls
>
> if current position is long then....... if current position is
square then .... if current position is short then ...
>
> what is the function for checking the current position ?
Any clues ?
 
Regards
 
 
----- Original Message -----
Sent: Tuesday, May 03, 2005 3:32 PM
Subject: Re: [EquisMetaStock Group] TRAILING STOP LOSS

Hi Sharad,

How about using the Max function, something like

X := Max( Ref(X,-1), Y )

will let X either take on Y if it is higher than the current X or stay
at the current X.  You can also do the same using

X := Max( PREV, Y )

but this, I am told, is not good MS practise...

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com


--- In equismetastock@xxxxxxxxxxxxxxx, "Sharad Lohia"
<sharadlohia@x...> wrote:
> Dear all,
>
> Is there a Bug with "Trailing Stop Loss" in metastock. It does not
seem to be working properly at all.
>
> It should be programmable in Close Long / Short condition.
>
> Hi:=ValueWhen(1,H>Ref(H,-1),H);
> this catches the last swing top - which need not be the highest high
in that particular long position.
>
> Hi:=ValueWhen(1,H>Ref(Hi,-1),H);
> this also does not work.
>
> How can i update a variable value only when a fresh value of higher
value is compared with its current value?
>
> somethimes i feel excel is so much easier :-)
>
>
> Also - i want to program this condition - can someone help pls
>
> if current position is long then....... if current position is
square then .... if current position is short then ...
>
> what is the function for checking the current position ?
>
> Thnx in advance
>
> Regards





------------------------ 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/BefplB/TM
--------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Yahoo! Groups Links