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

[amibroker] Re:Dynamically change PositionSize



PureBytes Links

Trading Reference Links

Hi Eric,

I couldn't get your code to work. I made some slight amendments (not 
to the critical areas) and it was "PointValue" not "PositionSize" 
that I meant to change - sorry, a confused moment!!!


if( Status("action") == actionPortfolio ) 
{ 
    bo = GetBacktesterObject(); 
    bo.PreProcess();

    for(bar = 0; bar < BarCount; bar++){ 

        for(sig = bo.getFirstSignal(bar); sig; sig = 
bo.getNextSignal(bar)){

            sig.PointValue = 5000;

        }
        bo.processTradeSignals(bar);
    }

    bo.postProcess();
}

Can anyone advise?


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date: 2/7/2007 3:33 PM