PureBytes Links
Trading Reference Links
|
Thanks DT. You have put me on track. I am now trying to get the
stop loss to work properly.
Regards, Keith
--- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> Keith,
> what you ask is
> Short=Open>Ref(High,-1);
> Cover=Open<ValueWhen(Short,Open);
> Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
> Take care in Settings, especially the Delay.
> DT
> --- In amibroker@xxxx, "knewhous" <knewhous@xxxx> wrote:
> > Hi Group,
> >
> > What I am endeavouring to do is to write code for the following
> > situation:
> >
> > If the Open for today has gapped above yesterday's High I want to
> > enter short at Open. I then want to exit the trade by Covering
the
> > Short at the next profitable Open, which will of course be below
> the
> > original entry point and could be any period in the future.
> >
> > Short=Open>Ref(High,-1): gives me the entry, but
> >
> > Cover=Low<(Open-1); will only give me an exit when the Low
> is
> > below the Open of the same day but some time in the future. In
> other
> > words the two expressions are not mutually exclusive.
> >
> > Can anyone help me with this, please.
> >
> > Cheers,
> > Keith.
|