So I got something, and I will anyway never use the answers given, otherwise learning effect would be zero, I got soemthing that compiles.

I have no idea if it is correecxt, but it compiles.

function wcl()

{

var weight = 1;

var high = priceHigh();

var low = priceLow();

var close = priceClose();

var calc = high+low+weight*close/(2+weight);

return calc;

vars wclS=series(wcl());

}

Now I want to call the function to visualise what it may or may not calculate.

The function is embedded in Workshop7.

Within the main run() I have

wcl();

plot("WCL",wcl(),0,BLUE);

How would I correctly plot the bars showing the WCL like shown here?

https://zorro-project.com/manual/en/plot.htm