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

Re: [EquisMetaStock Group] Referencing the most recent occurrence



PureBytes Links

Trading Reference Links

Tim

> Can anyone suggest how I can reference the price at which a the most
> recent occurrence of a long entry took place. I need to know this
> price in order to define a stop loss or stop profit exit.

Here's some more "latch" practice.

There are many ways you can configure this latch. By not storing the entry
price in the latch but referencing it using ValueWhen(entry) we eliminate
one PREV.

Have fun.

Roy

  {Trade Stop Tim}
N:=Fml("long entry signal (price spike)");
X:=Fml("nominal exit");
I:=Cum(N+X>-1)=1;
Tr:=If(PREV<=0,N>0,If( X {standard exit}
  OR {10% profit stop}
  ValueWhen(1,PREV=0, N {entry price} )>=C*1.1,
  {OR any other entry related exit}
  -1 {negative spike exit signal},
  1)); {or trade continues}
Xb:=Tr<0; {exit bar}
Tr:=Abs(Tr)*ValueWhen(1,I OR (Alert(Tr=0,2)
AND Tr),N); {trade acitive * entry price}
Tr;



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->

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/