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

Re: [amibroker] Contiguous cross signal



PureBytes Links

Trading Reference Links

Hi. I'm TOBY.

self response...
I made function. OK. Thanks.

--------------------
function ContiguousCross(BuyArray, SellArray)
{
	condition = Null;
	for( i = 1; i < BarCount; i++ ) {
		if (BuyArray[i]) {
			condition = True;
		} else if (SellArray[i]) {
			condition = False;
		}
		result[i] = condition;
	}
	return result;
}


Buy = ContiguousCross(Cross(Value, LineA), Cross(LineB, Value));
Sell = NOT Buy;
--------------------

http://tobysoft.net/archives/AmiBroker/CrossSignalB.png
--
TOBY
E-MAIL: t-o-b-y(at mark)tobysoft.net
URL: http://tobysoft.net/