Would be lovely to understand - is there any built-in mechanism to track the PNL bar by bar for a symbol / basket of symbols, and have a second PNL / set of orders based on how good the first PNL goes ... say for example, to apply a moving average on the first PNL line and be "on" or "off" on the second pnl?
If so, yes there is a way to track PNL on bar by bar basis.
There are two ways to approach this:
By accessing equity value of previous backtest - the equity represents bar by bar cumulated PNL of positions open during the backtest. You can access equity of previous backtest usign Foreign call, calculate averages on it and create new system that uses that info to enter trades.
Using custom backtester
Custom backtester allows you to watch open positions and get their PNL on the fly (during backtest in progress) Inside custom backtester you can calcualte moving average and place new orders, see Porfolio Backtester Interface Reference
Indeed, for backtesting. Amazing, thanks! if there are any examples already somewhere (or on using Foreign calls), would welcome a link - I know this idea is not new, but do not know the terminology industry uses for it (PNL based trading doesn't sound right at all)