求:TB系统自带的策略单元净利润资金曲线代码!我要改写进副图中

求:TB系统自带的策略单元净利润资金曲线代码!我要改写进副图中,谢谢!

在一个资金账户下运行多个策略单元,如何获取每个单元的积累净利润?
请教:TB自带的海归系统出现信号闪烁的问题
资金曲线如何才能显示划到K线副图上
系统自带策略编译
同一个策略单元的不同品种的资金曲线在哪里能看到
新安装的TB3编译系统自带的用户函数/策略应用均报错
请问系统自带的领航系列策略如何才能导出?
如何获得资金曲线?
关于实时资金曲线
求适合小资金策略

参考下面的代码,小数点之后的微小差异应该是处理小数略有不同,就不用在意了

Params
	Numeric FastLength(5);// 短期指数平均线参数
	Numeric SlowLength(20);// 长期指数平均线参数
    Integer slipMode(1);    //滑点,0-元,1-跳

Vars
	Series<Numeric> AvgValue1; 
	Series<Numeric> AvgValue2;
    Global Numeric slippage;
    Global Numeric nChartCRate;
    
Events
    OnReady()
    {
        //获取滑点
        Integer flag = slipMode;
        Bool ret = GetSlippage(flag, slippage);
        if(ret)
        {
            Print("slippage:" + Text(slippage));
        }
        Else
        {
            Print("slippage:" + Text(0));
        }
        
        //获取手续费
        CommissionRate cRate;
        ret = GetCommissionRate(cRate);
        
        // 输出数值
        nChartCRate = 0;
        If(ret)
        {//只考虑正常收取的情况
            If(BitHas(cRate.ratioType, Enum_Rate_ByFillAmount))
            {
                nChartCRate = cRate.openRatio / 10000;
            }
            Else If(BitHas(cRate.ratioType, Enum_Rate_AmountPerHand))
            {
                nChartCRate = cRate.openRatio;
            }
            Else If(BitHas(cRate.ratioType, Enum_Rate_PointPerHand))
            {
                nChartCRate = cRate.openRatio * MinMove * PriceScale * BigPointValue;
            }
        }
        Print("nChartCRate="+Text(nChartCRate));

    }


    //Bar更新事件函数,参数indexs表示变化的数据源图层ID数组
    OnBar(ArrayRef<Integer> indexs)
    {                     
        AvgValue1 = AverageFC(Close,FastLength);
		AvgValue2 = AverageFC(Close,SlowLength);
		//PlotNumeric("MA1",AvgValue1);
		//PlotNumeric("MA2",AvgValue2);		
				
		If(MarketPosition <>1 && AvgValue1[1] > AvgValue2[1])
		{
			Buy(0,Open);
		}
		
		If(MarketPosition <>-1 && AvgValue1[1] < AvgValue2[1])
		{
			SellShort(0,Open);
		}	
		
        //PlotNumeric("净利润1",Portfolio_CurrentEquity-Portfolio_InitCapital);    
        //PlotNumeric("净利",Portfolio_NetProfit);    
         
        Numeric diff1 = iif(nChartCRate>0.01,ABS(CurrentContracts)*nChartCRate,ABS(CurrentContracts)*Close*contractunit*bigpointValue*nChartCRate);
        Numeric diff2 = slippage*MinMove*PriceScale*BigPointValue*contractUnit;
        Commentary("diff1="+Text(diff1));
        Commentary("slippage="+Text(slippage));
        Commentary("diff2="+Text(diff2));
        Commentary("净利润2="+Text(Portfolio_NetProfit+Portfolio_PositionProfit));
		PlotNumeric("净利润3",Portfolio_NetProfit+Portfolio_PositionProfit-diff1-diff2);
    }