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

Re: [amibroker] Re: non-real simulation?



PureBytes Links

Trading Reference Links

Hi Oscar,

You are correct that it means

H > Buystop AND ref(H,-1) < ref(Buystop,-1)

Both arrays can be either static or dynamic and I don't think it should 
matter how volatile they are, it only checks to see whether VarA was below 
VarB on one bar and then above it on the next. If this does not do what you 
want to do, you probably need to change or add to your code - can you 
explain your full buy/sell conditions in English?

Steve

----- Original Message ----- 
From: "cagigas00" <cagigas00@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, March 22, 2006 3:18 AM
Subject: [amibroker] Re: non-real simulation?


> corrected:
>
> Thank you Steve for your answer. Thanks to you I have found the
> problem. It is my understanding of the cross function.
>
> I thought cross(H,Buystop) was equivalent to H > Buystop AND ref(H,-
> 1) < Buystop
>
> But actually it is equivalent to:
>
> H > Buystop AND ref(H,-1) < ref(Buystop,-1)
>
> Buystop is dynamic and is changing everyday. If there is a long bar
> before my buy rules are true Amibroker will not generate a buy since
> ref(H,-1) is higher than ref(Buystop,-1). For the cross to be true
> we need that buystop does not change much (upside) from day to day.
> Thomas
> please confirm.
>
> Oscar
>
> --- In amibroker@xxxxxxxxxxxxxxx, "cagigas00" <cagigas00@xxx> wrote:
>>
>> Thank you Steve for your answer. Thanks to you I have found the
>> problem. It is my understanding of the cross function.
>>
>> I thought cross(H,Buystop) was equivalent to H > Buystop AND ref
> (H,-
>> 1) > Buystop
>>
>> But actually it is equivalent to:
>>
>> H > Buystop AND ref(H,-1) > ref(Buystop,-1)
>>
>> Buystop is dynamic and is changing everyday. If there is a long
> bar
>> before my buy rules are true Amibroker will not generate a bar
> since
>> ref(H,-1) is higher than ref(Buystop,-1). For the cross to be true
>> we need that buystop does not change much from day to day.  Thomas
>> please confirm.
>>
>> Oscar
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@> wrote:
>> >
>> > Hi,
>> >
>> > The 2 formulas say different things. Cross function only marks
>> actual
>> > crosses - i.e., a bar where H is above Buystop and on the
> previous
>> bar it
>> > was below. Your second method will mark all bars where H is
> above
>> Buystop,
>> > whether a cross just occurred or not.
>> >
>> > Steve
>> >
>> > ----- Original Message ----- 
>> > From: "cagigas00" <cagigas00@>
>> > To: <amibroker@xxxxxxxxxxxxxxx>
>> > Sent: Tuesday, March 21, 2006 9:37 AM
>> > Subject: [amibroker] non-real simulation?
>> >
>> >
>> > > If you test a system which buys on stop:
>> > >
>> > > Buystop=ref(H,-1);
>> > > buy = [buyrules] and cross(H,Buystop);
>> > >
>> > > and gives you nice results try changing to:
>> > >
>> > > Buystop=ref(H,-1);
>> > > buy = [buyrules] and H > Buystop;
>> > >
>> > > and you obtain more trades and worse results. I don't
> understand
>> > > this since once the day is gone I know the cross only happened
>> if we
>> > > had a high above the buystop. In real life the 2 situations are
>> > > identical, the high exceeded the buystop.
>> > >
>> > > from the help:
>> > >
>> > > CROSS(ARRAY1,ARRAY2) Gives a "+1" or true on the day that
> ARRAY1
>> > > crosses above ARRAY2. Otherwise the result is "0".
>> > >
>> > > What am I missing here, why do we have different results in
>> > > simulation?
>> > >
>> > > do we have a "false" in the CROSS if at the end of the day the
>> close
>> > > is below Buystop???
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > 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 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 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 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/

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