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

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



PureBytes Links

Trading Reference Links

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@xxx> 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]



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