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

[amibroker] Keeping a counter



PureBytes Links

Trading Reference Links

How do you do this in AFL?

I want to keep a counter variable that adds 1 everytime a Sell=1. In 
VisualBasic it would be:

cntr = 0
for i = 0 to barcount
  if Sell[i] = 1 then cntr = cntr + 1
next i

cntr then becomes the number of trades that have closed. For example, 
if there were two trades in the backtest, cntr would be 2.

Thanks - Alex


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/693 - Release Date: 2/19/2007 5:01 PM