PureBytes Links
Trading Reference Links
|
Hi Eric,
You might add 6 true/false variables (if necessary) and simply use a counter
whenever any of your six conditions becomes true:
var: Criterion1(false),Criterion2(false),Criterion3(false),
Criterion4(false),Criterion5(false),Criterion6(false), Counter(0);
Counter=0;
Criterion1=false;
{your code for Condition1 comes here}
{if your Condition1 is met} then Criterion1=true;
if Criterion1 then Counter=Counter+1;
Criterion2=false;
{your code for Condition2 comes here}
{if your Condition2 is met} then Criterion2=true;
if Criterion2 then Counter=Counter+1;
....
....
....
Criterion6=false;
{your code for Condition6 comes here}
{if your Condition6 is met} then Criterion6=true;
if Criterion6 then Counter=Counter+1;
if Counter=4 then {your plot statement comes here}
If you would like to limit the plot solely to the last bar, please add the
corresponding code.
Regards,
Zoltan
-----Original Message-----
From: ericzhou [mailto:ericzh2003@xxxxxxxx]
Sent: Sunday, January 15, 2006 02:36
To: omega-list@xxxxxxxxxxxxxxx
Subject: code help
Hi list,
Does anyone have idea on coding this:
To count the number of criteriias that have been met at the last bar.
for example, if any four conditions out of six become true, plot a dot or
paintbar.
Any suggestion will be much appreciated.
Eric
|