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

[amibroker] Re: Max simultaneous open positions



PureBytes Links

Trading Reference Links

This appears to work better and faster
///////////////////////////////////////////////////////////
  for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
  {
    teb = ValueWhen( dt == trade.EntryDateTime, bi, 1 );
    txb = ValueWhen( dt == trade.ExitDateTime, bi, 1 );
    endbar = txb[barcount-1];
    for ( bar = teb[barcount-1]; bar <= endbar; bar++ )
    {
      sot[bar]++;
    }// for bar
   } // for trade
  hsot = LastValue( Highest( sot ) );

///////////////////////////////////////////////////////////


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date: 1/18/2007 1:03 PM