Hi, I'd really appreciate any help because this is way beyond me. I'm trying to learn CBT, the High level, and I want to create custom metrics and report charts.
I've managed to create some really cool things, but when I try to create "scatter" charts (sorry if that's not the right term), I'm stuck. Basically, I'm trying to create a report chart that looks like this:
It would be a report chart where the X-axis shows the trade number and the Y-axis shows the result. I'm trying to make two charts, one for winning trades and one for losing trades. This is what I'm putting in the custom procedure path:
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest();
stat = bo.GetPerformanceStats(0);
prof = 0;
for (trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade())
{
prof = trade.GetProfit();
}
StaticVarSet("prof", prof);
}
And this is what I'm putting in the report chart:
Profit = StaticVarGet("prof");
Title = EncodeColor(colorBlack) + " Profit: " + NumToStr( Profit, 1.0, True);
Plot(Profit, "Profit",colorRed, styleLine);
This is what I've gotten so far:
As you can see, I'm very, very far from where I want to be, but I'm unable to progress any further.
I've read everything I could find about CBT, but my level is very low.









