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

Re: [EquisMetaStock Group] flag signal



PureBytes Links

Trading Reference Links

Hi Jose

The simplicity of using ValueWhen() as a latch has just hit me. Brilliant.

Adding an "initialisation" signal should help eliminate the annoying N/A,
though in this case an N/A result would be as good as a zero result that
no signal had been seen.

---8<------------------
{+1 = Long,  -1 = Short, 0 = no signal yet}
x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
i:=Cum(x>-1)=1;
ValueWhen(1,i OR x<>0,x)
---8<------------------


Regards

Roy

> Column C (Hold):
> 
> ---8<------------------
> {+1 = Long,  -1 = Short}
> x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
> ValueWhen(1,x<>0,x)
> ---8<------------------
> 
> 
> jose
> http://www.metastocktools.com
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "Robert Jolley" <rjolley@xxxx> 
> wrote:
>> In the Exploration Editor:
>> 
>> 
>> If 
>> 
>> Column A (Buy) has:
>> 
>> FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS") =1
>>  
>> 
>> Column B (Sell) has:
>> 
>> FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS") =-1
>> 
>> 
>> Then
>> 
>> How can I code Column C (Hold) to look back and determine if the
>> last signal was a Buy (1) or a Sell (0)?
>> 
>>  
>> 
>> Robert Jolley
>> 
>> The Smart Retirement <http://www.smartretirementinvestor.com/>  
> Investor
> 
> 
> 
> 
> 
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
> 
>  a.. To visit your group on the web, go to:
>  http://groups.yahoo.com/group/equismetastock/
>    
>  b.. To unsubscribe from this group, send an email to:
>  equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>    
>  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/