Multiple condition entries and exits
Moderator: Chris White
Multiple condition entries and exits
Can there be more than one condition for an entry (and exit) e.g. enter when CCI(20 period) is below 200 and the stock price is above its 75 period moving average. If yes, how is this done? If more than one condition is possible, is there a limit on the number of conditions?
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: Multiple condition entries and exits
Yes there can be more than one condition for an entry and exit. Even though the security selector only accepts one chart script currently, that chart script can be configured with multiple conditions. The number of conditions added in this way is unlimited.
As an example, for the specific criteria that you mentioned, here's how that would be done in Chart Script:
When this script is added to a chart area it looks like this:
When this script is added to the entries and exits tab to perform scanning it looks like this:
As an example, for the specific criteria that you mentioned, here's how that would be done in Chart Script:
Code: Select all
cond1:= FML('CCI(20)[CCI]') < 200;
cond2:= C > MA(C, 75);
event: cond1 & cond2;