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

[EquisMetaStock Group] Re: Cannot get an indicator to trigger first time around.



PureBytes Links

Trading Reference Links

Roy...
If you could humor me... from what I was able to find in the MS 
manual, in experts you can use local variable only inside WRITEIF's 
and WRITEVAL's. Am I missing something.... BTW I am a MSTT 
subscriber, but have not fisnished reading all the back issues. If 
you have written details on experts and what I am trying to do, 
please point me in that direction. But it sure would be helpful if 
you could specifically add the init routine into this code which is 
part of the EXPERT I am working on

----------------------------  
The most recent High Beta was writeif( BarsSince(Fml( "!QUTSH -  
Setup Day - High Beta") ) < BarsSince(Fml( "!QDTSH - Setup Day - 
High Beta") ) , "an UPTREND" , "a DOWNTREND")
----------------------------  

Thanks for your help...

Dean



--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" 
<rlarsen_quik@xxx> wrote:
>
> Dean
> 
> I wondered what the WriteIf() was doing in an exploration.
> 
> Almost every trick that can be applied to indicators can also be 
applied to experts, and the "Init" bar is particularly helpful with 
a latch configuration that's based on BarsSince(Event A) relative to 
BarsSince(Event B). Typically Event A could be Buy and event B a 
Sell, but not necessarily.
> 
> The only significant difference between an indicator, exploration 
column or section of an expert is the way in which the result is 
communicated.
> 
> N:= "your set signal";
> X:= "your reset signal";
> Init:=Cum((N OR X) >-1)=1;
> State:=BarsSince(Init OR N)<(BarsSince(Init OR X);
> State;
> 
> Init can also be constructed as follows.
> 
> Init:=Cum(IsDefined(N OR X))=1;
> 
> 
> Roy
>  
> ----- Original Message ----- 
> From: longhair4277 
> To: equismetastock@xxxxxxxxxxxxxxx 
> Sent: Friday, March 16, 2007 12:47 PM
> Subject: [EquisMetaStock Group] Re: Cannot get an indicator to 
trigger first time around.
> 
> 
> Thanks for the reply, but OOPPSS, what a screw up I just made.It's 
> been a looong day... 
> I meant an "Expert Advisor", not an "Explorer" Sorry about that.
> Thanks 
> Dean
> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" 
> <rlarsen_quik@> wrote:
> >
> > Longhair
> > 
> > 
> > There are several ways to eliminate such errors in the Explorer. 
> An Init function might be part of the solution and is usually 
> helpful with BarsSince() / ValueWhen() type functions. Another 
> useful device is to pass an N/A result to one of the Forum DLL 
> functions (Summing 1 period of the troublesome output should do 
it). 
> This converts N/A to 0 which is much easier to work with. If you 
can 
> manipulate your code to output zero when there has been no signal 
in 
> the scanned range you then have the opportunity to filter out all 
> invalid/zero results.
> > 
> > The golden rule with all explorations is, of course, to scan 
> sufficient bars to produce the required result. While this is not 
> always possible, using "Minimum Records" is guaranteed to fail 
when 
> BarsSince() / ValueWhen() type functions are included in 
exploration 
> formulas.
> > 
> > 
> > Roy
> > 
> > 
> > ----- Original Message ----- 
> > From: longhair4277 
> > To: equismetastock@xxxxxxxxxxxxxxx 
> > Sent: Friday, March 16, 2007 11:59 AM
> > Subject: [EquisMetaStock Group] Re: Cannot get an indicator to 
> trigger first time around.
> > 
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" 
> > <josesilva22@> wrote:
> > >
> > > Init:=Cum(IsDefined(RoaR))=2;
> > > 
> > > Steve, the Init variable above holds an initialization signal 
> when 
> > the 
> > > RoaR plot has been defined/valid (i.e., not N/A) for two bars. 
> > This 
> > > initialization/seeding is necessary because the BarsSince() 
> > conditions 
> > > create null (N/A) bars prior to the first crossover reference 
> > signal.
> > > 
> > > So, why not "Init:=Cum(IsDefined(RoaR))=1;" instead?
> > > Because the Cross() function adds a null bar and would miss 
that 
> > first 
> > > initialization signal.
> > > 
> > > Creates/adds null bars? It sounds like "creating a void or 
> > vacuum".
> > > Doesn't sound right but hopefully you get my meaning.
> > > 
> > > 
> > > jose '-)
> > > http://www.metastocktools.com
> > > 
> > >
> > Is there anyway do do an "init" in an explorer? 
> > As an example of what I am trying to accomplish. This is a 
snipet 
> of 
> > the code that I have in the explorer:
> > The most recent High Beta was writeif( BarsSince(Fml( "!QUTSH - 
> > Setup Day - High Beta") ) < BarsSince(Fml( "!QDTSH - Setup Day - 
> > High Beta") ) , "an UPTREND" , "a DOWNTREND")
> > 
> > This produces the following error until I get 1 valid signal:
> > (*ERROR*: Function is not defined for the current date)
> > 
> > 
> > 
> > 
> > 
> > [Non-text portions of this message have been removed]
> >
> 
> 
> 
>  
> 
> [Non-text portions of this message have been removed]
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Transfer from your equities account.  
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/