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

[amibroker] Re: combining two conditions for buy or sell signals


  • Date: Sat, 13 Mar 2010 14:39:53 -0000
  • From: "woodshedder_blogspot" <woodshedder_blogspot@xxxxxxxxx>
  • Subject: [amibroker] Re: combining two conditions for buy or sell signals

PureBytes Links

Trading Reference Links

rijnaars, first decide how to quantify rising. I'll get you started but you may not agree with my quantification of rising.

MA5=MA(C,5);
MA20=MA(C,20);

Cond1=ref(MA20,-1)<MA20; //MA20 is lower yesterday than today (rising)
Cond2=cross(MA5,MA20); //requires MA5 to cross above MA20

Buy=Cond1 AND Cond2;

You could use a longer lookback, requiring that the MA20 is higher today than it was 3 days ago, but the simplest definition of rising is that it is higher today than yesterday.
Regards,
Wood


--- In amibroker@xxxxxxxxxxxxxxx, "rijnaars" <rijnaa@xxx> wrote:
>
> if i want a buy signal for instance when the MA 5  is crossing MA 20 zone 
> but only want this buy signal when the MA is crossing a rising MA 20 
> in upwards direction.
> 
> So not only must MA5 croos upwards but also must the MA 20 be rising
> 
> how do i make this buy condition??
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/