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

Re: [amibroker] Cross and Exit rules



PureBytes Links

Trading Reference Links

Hi,

Cross function IS different from simple >=.

Cross( array1, array2 ) function checks the following:

array1(today) > array2( today ) AND array1(yesterday) <= array2( yesterday)

Please note that first part of the statement is "greater than"
and not "greater or equal"

For the stops: please download the latest version 3.60a 
(http://www.amibroker.com/bin/ab360abeta.zip)
stops (profit target and max loss) work more precisely with this version.

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com

----- Original Message ----- 
From: "David Beaudoin" <dcbeaudoin@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, May 30, 2001 9:50 PM
Subject: [amibroker] Cross and Exit rules


> Dear Tomasz,
> 
> I am rather reluctant to ask for help because I know how busy you are 
> trying to complete version 3.6, but I am becoming increasingly frustrated 
> with my inability to figure out how to progress further in what I am doing.
> 
> First of all, I am confused about the "cross" function. If I want to take 
> a long position only if (among other things) today's price trades 0.05 
> above yesterday's high, I would think that the following would capture that:
> 
> buyprice = ref( high,-1 ) + 0.05;
> buy = cross ( high, buyprice);
> 
> However, this does not always trigger an appropriate signal, as compared to:
> 
> buyprice = ref( high,-1 ) + 0.05;
> buy = (high >= buyprice );
> 
> What is the difference?
> 
> Secondly, I am really struggling with rules to Exit (both sell and cover) 
> positions. I am essentially looking to have positions closed in either a 
> 6-point profit or a 4-point loss. Yet, when I enable the Stops in the 
> "Settings" menu, my reports show me exiting positions without either of 
> those conditions being met. I understand that in some of these cases, the 
> system is closing and reversing because the entry conditions have been met 
> for the opposite direction, but there are many more instances where that 
> isn't the case and the trade is exited arbitrarily. I have even tried to 
> disable the Stops and just do the following, but I still get the same outcome:
> 
> sell =(( high >= (buyprice + 6)) OR ( low <= (buyprice - 4)));
> cover =(( low <= (shortprice - 6)) OR ( high >= (shortprice + 4)));
> 
> Is there any chance you could help me out? I was enjoying the program 
> tremendously, but I have really become discouraged by my lack of progress 
> in overcoming these questions.
> 
> Sincerely,
> 
> David Beaudoin
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>