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

[EquisMetaStock Group] Re: Eliminating PREV and Signal Delay - Help Needed



PureBytes Links

Trading Reference Links

Hi MG:

Thanx for the lines. But, I don't really get it all. Can you post 
some examples, especially on delay execution with 1 bar for the Long 
Exit, so that I can have better ideas of coding it? 

My only idea now is Ref(LX,-1)=1. But will it refer to my previous 
LX signal when current LX condition is not yet fulfil?

Thank yoU!

Gary.


--- In equismetastock@xxxxxxxxxxxxxxx, mgf_za_1999 <no_reply@xxxx> 
wrote:
>
> Hi Gary, 
>  
> Try the ref(x,-n) function, which references or 'delays' a time 
> series x with n periods. So you could do something like calculate 
> two triggers, 
>  
>     Trigger1 := some stuff 
>     Trigger2 := some stuff, based on Ref(Trigger1,-1) 
>  
> and use Trigger2. I did not attempt to do it with your code, but 
> hope you get the idea. The same applies for your entry/exit code. 
In 
> stead of using say signal, use Ref(signal,-1) to delay execution 
> with 1 bar. 
>  
> Regards 
> MG Ferreira 
> TsaTsa EOD Programmer and trading model builder 
> http://www.ferra4models.com 
> http://fun.ferra4models.com  
>  
>  
> --- In equismetastock@xxxxxxxxxxxxxxx, "richr4ever" 
> <richr4ever@xxxx> wrote: 
> > 
> > Hello to all: 
> >  
> > I have two questions here. One about eliminating the PREV and 
one 
> on  
> > signal delay. 
> >  
> > For PREV, I have the below codes: 
> >  
> > LE:=Condition A 
> > SE:=Condition B  
> > LX:=Condition C  
> > SX:=Condition D 
> > Trigger:=If( LE=1, 1, If(SE=1, -1, If((LX AND PREV=1) OR (SX 
AND  
> > PREV=-1),0,PREV))); 
> > LEEntry:=Cross(Trigger,0.5 ); 
> >  
> > How can I perfect the above codes by removing the PREV function 
> and  
> > increase the codes efficiency, and without using any DLL? 
> >  
> > And for the signal delay, say the Long Exit's condtion is met 
on  
> > current bar. But I want the Long Exit signal set to one bar 
delay 
> to  
> > next bar's open. I am currently using BarsSince() function but 
I  
> > wonder if there a better way to code it. I don't want to use 
the  
> > System Tester feature for this purpose. 
> >  
> > Many thanx in advance! 
> >  
> > Gary. 
> >
>








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/