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

[amibroker] Re: Not sure how to create a trigger



PureBytes Links

Trading Reference Links

Also,

you may want to rethink your logic to be more restrictive. Just 
looking to see if the RSI was less than 30 *ever* is not going to be 
very usefull. You might want to adjust your strategy for trigger1 to 
be RSI < 30 within some predefined time period (e.g. within last 20 
bars) giving the following:

Buy = BarsSince(RSI(14) < 30) < 20
AND Cross(MA(Close, 5), MA(Close, 10));

If you specifically wanted to measure from the point that the RSI 
*first crossed* below 30 (as opposed to the most recent day at which 
it was *still* below 30), you would use Cross in the first expression 
too:

Buy = BarsSince(Cross(30, RSI(14))) < 20
AND Cross(MA(Close, 5), MA(Close, 10));

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <timesarrow@xxx> 
wrote:
>
> Sounds like you want something along these lines: barssince(rsi < 
30) > 1 and (moving average condition). 
> 
> Bill
> 
> 
>   ----- Original Message ----- 
>   From: tridean34 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Tuesday, July 08, 2008 8:26 AM
>   Subject: [amibroker] Re: Not sure how to create a trigger
> 
> 
>   Hi Guys,
>   sorry for not being more specific.
> 
>   Let's say it is RSI I am using.
> 
>   If RSI < 30 then look for trigger 2. Let's say trigger 2 is mav 
>   crossover. Say 5 and 10
> 
>   If mav 5 crosses above mav 10 then buy.
> 
>   As this stands I can have
> 
>   Buy = RSI < 30 
>   AND 
>   MAV 5 > MAV 10; (or something like that)
> 
>   The problem is, I don't care if the RSI is < 30 when the 5 mav 
>   actually crosses above the 10 mav, only that it occurred before 
hand. 
>   The RSI MUST hit or go below 30 before the system looks for the 
mav 
>   crossover, but once the crossover takes place, the RSI does NOT 
have 
>   to be at any specific level
> 
>   And it is this I don't know how to code.
> 
>   cheers
>   Dean
> 
> 
>   ------------------------------------
> 
>   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
> 
> 
> 
> 
>   No virus found in this incoming message.
>   Checked by AVG - http://www.avg.com 
>   Version: 8.0.138 / Virus Database: 270.4.6/1539 - Release Date: 
7/7/2008 6:35 PM
>



------------------------------------

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/