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

Re: [amibroker] Triggering a buy after setup


  • Date: Wed, 3 Feb 2010 12:16:58 +0100
  • From: "Edward Pottasch" <empottasch@xxxxxxxxx>
  • Subject: Re: [amibroker] Triggering a buy after setup

PureBytes Links

Trading Reference Links



like this:
 
setup = H < Ref(H,-3) AND Ref(H,-1) < Ref(H,-3) AND Ref(H, -2) < Ref(H, -3) AND L > Ref(L,-3) AND Ref(L,-1) > Ref(L, -3) AND Ref(L, -2) > Ref(L, -3);
vsetup = ValueWhen(setup,H,1);
 
Buy = Cross(C,vsetup);
 
 
 
----- Original Message -----
Sent: Wednesday, February 03, 2010 12:04 PM
Subject: [amibroker] Triggering a buy after setup

 

Hi, I am trying to generate a BUY signal after a 3 Bar setup where the setup bar is followed by two more bars. The BUY signal occurs when a future (after the two bars) bar CLOSE exceeds the HIGH of the setup bar.

The following code (which I know is wrong) triggers the BUY on the first bar after the two bars after the setup bar.

Buy = H < Ref(H,-3) AND Ref(H,-1) < Ref(H,-3) AND Ref(H, -2) < Ref(H, -3) AND L > Ref(L,-3) AND Ref(L,-1) > Ref(L, -3) AND Ref(L, -2) > Ref(L, -3);

How do I delay the BUY for a variable number of bars until the next CLOSE exceeds the HIGH of the setup bar.

Thanks.....Keith



__._,_.___


**** 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

__,_._,___