PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> Hello,
>
> The formula for your system should look like this:
>
> CondA = Ref( somethingA, -3 );
> CondB = Ref( somethingB, -2 );
> CondC = Ref( somethingC, -1 );
>
> buyprice = 1.02 * Open;
>
> // buy only if buyatstop order can be activated during the day (
buyprice <= high )
> buy = buyprice <= High AND CondA AND CondB AND CondC;
>
>
> where somethingA..C represent your conditions that must be met
> on days A, B, C. Actual buy stop order is generated one day after
(D)
> with a buyprice of open + 2% .
> Delays in Settings should be set to zero as the formula has implied
delay of 1 bar.
>
Wow thanks a lot Tomasz !
I've setup my formula and it seems to generate the buy signals right
at the good day after all conditions were met, this is great.
Now I'm trying to create the sell signal, maybe you could help me
achieve my first AFL formula ?
Again, it should sell on the SAME day it was bought. So you see its a
kind of intraday simulation.
Here are the conditions necessary for the sell signal to be generated:
- A buy occured with the above conditions of course
- Sell at buy price (open*1.02) + 0.5%
- or Sell at buy price (open*1.02) -0.5 %
- If a sell signal couldn't be generated today (because price didn't
go up or down 0.5% from the buy price) then sell at close.
Again, all of this should happen the same day it was bought.
Thanks,
Lemanioc
>
> > Hi,
> > I don't know if this is possible and I wish to have an answer
please.
> >
> > I'd like to create a backtest mechanisme where I will buy with a
> > delay 0, on certain criteria concerning days ago A, B , C.
> > So I will buy on day D, but, not at the open/close/high/low... I
> > would like to set it so the buy will initiate at open+0,2 % on
day D.
> >
> > See what I want to do ? I want to create a backtest system where
it
> > will be supposed to buy at open+0,2% on Day D, after conditions
have
> > been met on day previous days A,B,C.
> >
> > It doesn't need to have intraday tick by tick data. As long as
the
> > day D's high is superior to open of day D by at least 0,2%, it
should
> > be enough for the system to consider that it can initiate the
trade
> > at open+0,2 %.
> >
> > Of course, this would only be possible on previous day where we
know
> > the full day trading range for any day D situation.
> >
> > Is this possible at all ? I see in the system screen that I can
set a
> > buy with delay at open/close/high/low/average, but I don't see
way to
> > ask for such a particular condition and wish to know if its
possible
> > or if it would require a new feature.
> >
> > Thanks,
> > Lemanioc
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
|