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

[amibroker] Re: Buysignal + wait



PureBytes Links

Trading Reference Links

>From a quick look through without trying it, and assuming that
Longsetup is a True/False type array, I can't see any reason why it
wouldn't work. I could be missing something though.

One thing that may need to be considered is whether the Cross function
will return True if H and HHV(H,3) are the same at Longsetup and then
H moves above it. If the high four bars before Longsetup was the
highest of the four, and then those three highs were all the same or
progessively higher, then the high moving above Triggerpoint again
would not constitute a cross (ie. if the high came down, rose steadily
to the Longsetup bar and then rose above it again). You could perhaps
just test for H > Triggerpoint instead and then use ExRem to remove
any redundant buy signals if you wanted to, or go back to your
original Triggerpoint condition with the additional 0.01.

GP


--- In amibroker@xxxxxxxxxxxxxxx, "bernardedmond01"
<bernardedmond01@xxx> wrote:
>
> Hi GP
> Both good points. I'm afraid I'm at the start of my learning curve 
> on AFL.
> 1. Triggerpoint is supposed to be the value at the Longsetup. 
> 2. No, of course, would not want to buy if a stop had been triggered 
> in the meantime. Suppose would want to enter within 5 bars.
> How should code be amended?
> Here's my attempt:
> 
> Longsetup = xxx;
> period = 5;
> Triggerpoint = ValueWhen (Longsetup, HHV(H,3));
> Buy = Cross(H,Triggerpoint) AND BarsSince (Longsetup)<=period AND 
> Sell == 0;
> 
> What do you think?
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "gp_sydney" <gp.investment@> 
> wrote:
> >
> > A couple of issues here.
> > 
> > Firstly, is Triggerpoint supposed to be the value at the Longsetup 
> bar
> > or the current bar? If the latter, then you'll never get a trigger
> > because H can never be greater than HHV(H,3)+0.01. If the former, 
> then
> > you need to latch in the value of HHV(H,3)+0.01 at the Longsetup 
> bar
> > until you get the trigger.
> > 
> > Secondly, is there any condition to cancel your Longsetup before
> > getting the trigger condition? For example, if the stock completely
> > tanks immediately after the Longsetup condition, do you still want 
> to
> > buy when the trigger condition is subsequently met (ignoring the 
> first
> > issue above), even if it's at a much lower price and/or much later?
> > 
> > GP
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@> wrote:
> > >
> > > Look at the FLIP command to maintain your initial setup 
> condition,
> > then use 
> > > AND H>Triggerpoint.
> > > 
> > > Once triggered, use FLIP again to reset.
> > > 
> > > ----- Original Message ----- 
> > > From: "bernardedmond01" <bernardedmond01@>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Thursday, June 14, 2007 4:54 PM
> > > Subject: [amibroker] Buysignal + wait
> > > 
> > > 
> > > > Hi all
> > > > How do I say the code in square brackets:
> > > >
> > > > Triggerpoint = HHV(H,3) + 0.01;
> > > > Longsetup = xxx;
> > > > Buy=Ref(Longsetup,-1) = = 1 [and wait until H>Triggerpoint];
> > > >
> > > > that is, the Lonsetup occurred on the previous bar but I don't 
> enter
> > > > until the high>Triggerpoint (which may be on the same or a 
> later bar)?
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > >
> > > > 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
> > > >
> > > >
> > > >
> > >
> >
>




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/