Hi,
I'm using the Custom Backtester Code to alter PointValue for each
trade. I intend to alter the PointValue for each trade according to
Equity and a few other calculations.
I tried the code below and it isn't working. I'm setting PointValue
to an arbitary number (300) just to test the code, and plotting the
PointValue to see the output.
Can anyone suggest - thanks.
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
bo.PreProcess();
for( bar = 0; bar < BarCount; bar++ )
{
CurrentPortfolioEquity = bo.Equity;
for( sig = bo.GetFirstSignal( bar ); sig; sig = bo.GetNextSignal(
bar ) )
{
sig.PointValue = 300;
}
bo.ProcessTradeSignals( bar );
}
bo.PostProcess();
}
Plot(PointValue,"PV",colorGreen,styleDots|styleOwnScale);