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

Re: Question about System Tester



PureBytes Links

Trading Reference Links

Onno,

I'm still unclear as to specifically what you want, so I didn't write a sample
test.  But see if this indicator gives the correct value.   I used a ma cross as
the enter condition for this indicator example.  If this gives the value that
you want, it ought to be able to be used in a test.
If by "calculation llv/hhv" you mean divide llv by the hhv, then try this:

EntryCond:=Cross(Mov(C,5,S),Mov(C,20,S));
HV:=HighestSince(1,EntryCond,H);
LV:=LowestSince(1,EntryCond,L);
LV/HV

But if you just want the values of the HHV and the LLV, then this is all you
need:

EntryCond:=Cross(Mov(C,5,S),Mov(C,20,S));
HighestSince(1,EntryCond,H);
LowestSince(1,EntryCond,L);

Hope this helps???

Regards,
Ken
--
mailto:divenfish@xxxxxxxxxxxxx


Onno Goedknegt wrote:

> Ken,
>
> What I would like to do is...
>
> Monitoring the price move during the trades:
>
> llv(data array,PERIOD) (llv=lowest low value)
> hhv(data array,PERIOD) (hhv=highest high value)
>
> The problem is...you have to set the PERIOD in these indicators.
>
> And what I want to do is:
> day 0, trading system gives BUY signal
> day 1 (one day after receiving buy signal) PERIOD:=1, calculation llv/hhv
> day 2 (two days after receiving buy signal) PERIOD:=2, calculation llv/hhv
> day 3 (three days after receiving buy signal) PERIOD:=3, calculation llv/hhv
> day 0, trading system gives SELL signal
> day 1 (one day after receiving sell signal) PERIOD:=1, calculation llv/hhv
> day 2 (two days after receiving sell signal) PERIOD:=2, calculation llv/hhv
> And so on...
>
> So in stead of choosing a certain CONSTANT PERIOD, I want the PERIOD to be
> VARIABLE, namely equal to the length of the last trade (in days).
>
> Can MetaStock do this?
> Or can Superchart do this?
> Or can Tradestation do this?
>
> Thanks!
> Onno
>
> PS.
> Tradestation uses different names for these indicators, namely:
> lowest(price, length)
> highest(price, length)