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

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


  • Date: Sat, 13 Mar 2010 10:35:38 -0600
  • From: "Joris Schuller" <jschuller@xxxxxxxxxxx>
  • Subject: RE: [amibroker] combining two conditions for buy or sell signals

PureBytes Links

Trading Reference Links



MA5=MA(C,5);
MA20=
MA(C,20);
Condition1=
Cross(MA5,MA20);
Condition2=MA20>
Ref(MA20,-1);
Condition3=
Cross(MA20,MA5);
Condition4=MA20<
Ref(MA20,-1);
Buy= Condition1 AND Condition2;
Sell= Condition3 AND Condition4;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
//No same day buy sell possible
Plot( Close, "Price", colorBlack, styleCandle );
Plot(MA5,"MA5",colorGreen,5);
Plot(MA20,"MA20",colorRed,5);
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );;

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of rijnaars
Sent: Saturday, March 13, 2010 7:13 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] combining two conditions for buy or sell signals

 

 

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/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___