% Plot target and predicted time series
figure;
clf('reset')
subplot(2,2,1:2)
grid
plot(series(end-500:end,:),'black');
hold on;
plot(A(end-500:end,:),'red');
subplot(2,2,3:4)
grid
%plot(series(end-90:end,:),'r-');
plot(doutput(end-90:end,:),'r-');
hold on;
plot(doutput(end-90:end,:),'ro');
hold on;
%plot(deltaseries(series(end-90:end,:)),'b-');
plot(dchk_data(end-90:end,5),'b-');
hold on;
plot(dchk_data(end-90:end,5),'bx');
hold off;
function dr = deltaseries(series)
noOfPoints = length(series);
r = series(2:noOfPoints,:) + log10((series(1:noOfPoints-1,:)./series(2:noOfPoints,:)));
dr = r;
Download and install Labsharp
using LabSharp;
...
private DataSeries ohlcha;
private int counter;
then use the Engine and the wmtsa package
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.