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

Re: [EquisMetaStock Group] Help trading system



PureBytes Links

Trading Reference Links

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=6130
------------------------------------------------------------------------

Juan

> hi, I am not very experienced in MS programming. Can anyone help me?
>
> when the system crosses adx> 20 i would like to keep a variable holding
that value for the next periods until adx>40 .
> How I do that.....here;s what i have done:
>
> signal:=0;
> If(Cross(ADX(12),20),signal=1,0)
>
> How I keep this value?
> thanks
>
>
> Juan

These latches may need some adjustment to give the correct set and reset
signals as I could not quite understand what you wanted. The attached
document has a little more explanation about the construction and use of
latches to remember values and events. Feel free to ask questions if you
don't understand something.

  {binary latch}
{sig:=Cross(ADX(12),20);
rst:=Cross(20,ADX(12)) OR Cross(40,ADX(12));
i:=Cum(sig+rst>-1)=1;
rmb:=BarsSince(sig OR i)<BarsSince(rst OR i);
rmb;}

  {value latch}
sig:=Cross(ADX(12),20);
rst:=Cross(20,ADX(12)) OR Cross(40,ADX(12));
rmb:=If(PREV=0,If(sig,CLOSE,0),If(rst,0,PREV));

Roy
rmb;

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/ 


Attachment:
Using Latches in MS.doc

Attachment: Description: "Description: MS-Word document"