PureBytes Links
Trading Reference Links
|
Barry,
You might consider setting a static variable when variable crosses up and
use that as your reference point for determining cross down. You'll need to
reset SV at start of each new bar. ... got to be careful though how you
implement it ... as you may get multiple down crosses depending on how noisy
the data is during that one bar.
----- Original Message -----
From: "Barry Scarborough" <razzbarry@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, September 23, 2008 12:58 PM
Subject: [amibroker] Re: A bug in Cross()?
> Thanks Ara,
>
> I kinda suspected it was something like that. I will find some other
> way to dance around this condition.
>
> Barry
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxx> wrote:
>>
>> Barry,
>>
>> If I understood you correctly, the down cross on same bar "can not
> happen".
>> I understand that the value of the variable went above and below
> the
>> threshhold.
>>
>> On the up cross, which you say hapended, the variable crossed the
>> threshhold. The criteria is that the last value is above the
> threshhold and
>> close of last bar is below threshhold.
>>
>> On the down cross (within same bar) you do not have a cross because
> you do
>> not mee the critria above.
>> The value simply drops below the trheshold ... so you have the
> close of last
>> bar AND last value both below the threshold ... so no event takes
> place.
>>
>> Ara
>>
>> ----- Original Message -----
>> From: "Barry Scarborough" <razzbarry@xxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Tuesday, September 23, 2008 10:28 AM
>> Subject: [amibroker] A bug in Cross()?
>>
>>
>> >I have two WMA, one with a period of 8 and the other 9. I use a
> cross
>> > function to time trades. Today on a 10 minute chart of TFZ8 at
> 11:19
>> > the WMAs crossed twice in that bar. The up cross closed a short
> but
>> > when the trend turned down it did not give a down cross signal.
> What
>> > about Cross will not let this work as expected within one bar?
>> >
>> > This is in an auto trading program. I know it didn't cross as I
> was
>> > tracing the program. I thought it might have to do with blocking
> trades
>> > while I wait for filled status and the number of contracts to
> equal 0
>> > but when I looked at the trace there was never a down cross when
> the
>> > trend continued down. I never got a short or sell signal.
>> >
>> > Should I expect Cross to give multiple signals within one bar if
> they
>> > do indeed cross both ways or multiple times within the bar?
>> >
>> > Thanks,
>> > Barry
>> >
>> >
>> > ------------------------------------
>> >
>> > 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
>
>
>
------------------------------------
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/
|