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

Combining Study() calls with AND/OR in versions 3.5x beta


  • To: "AmiBroker Mailing List" <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Combining Study() calls with AND/OR in versions 3.5x beta
  • From: "Tomasz Janeczko" <tj@xxxx>
  • Date: 20 Apr 2001 17:59:13 -0000

PureBytes Links

Trading Reference Links

Hi there,

There is a small problem with combining cross checks for multiple studies.

For example combining 2 study() function crosses with AND/OR:

sell = cross( study("up"), low ) OR cross( study("su"), low ) ;

does not always work correctly. The problem occurs ONLY when using multiple study() function
calls combined with AND/OR in one expression. Expressions using single study call are correct.

As a workaround you should enclose each cross() function with a IsTrue() function that
ensures proper operation.

Example:
sell = IsTrue( cross( study("up"), low ) ) OR IsTrue( cross( study("su"), low ) );

The problem will be fixed in the next release of AmiBroker (full 3.55 release expected this weekend), 
so you will not need the workaround anymore.

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