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

[amibroker] Re: How to get last Signal in Explore



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "Prashanth" <prash454.ta@xxx> wrote:
>
> Hello,
> 
> Suppose I have a formula which gives me Buy / Sell signals. Suppose 
Buy is given on Day 1 when the ticker is scanned. On Day 2, there is no 
signal, same for day 3, 4 and 5 till on the 6th day I get a Sell Signal.
> 
> Is there a way to get which Signal is currently active for the scrip 
on say Day3 (I.e., if I give a Explore on Day 3, it should tell me 
currently we are in Buy Mode).
> 
> I believe the syntax is quite simple, but unable to come up with the 
same and hence require help in that regard.
> 
> Thanks in Advance
> 
> Prashanth
>

Hello Prashanth,

This might be what you want.

FLIP
-  Trading system toolbox
(AFL 1.5)
 

SYNTAX  flip( ARRAY1, ARRAY2 )  
RETURNS ARRAY  
FUNCTION  works as a flip/flop device or "latch" (electronic/electric 
engineers will know what I mean)
returns 1 from the first occurence of "true" signal in Array1
until a "true" occurs in Array2 which resets the state back to zero
unil next "true" is detected in Array1...  
EXAMPLE buy = ExRem( buy, sell );
buy = Flip( buy, sell ); // this essentially reverts the process of 
ExRem - multiple signals are back again  

You can assign it to a variable and check if variable == 1 while still 
in the buy condition.

Hope that helps.



Cheers,

Brian_z




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

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

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

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/