Covert Thinkscript to Pinescript

Job ID: 33253061

Budget: $30 – $250 USD

Hi there, I need to convert the following Thinkscript to Pinescript:

openMA = CompoundValue(1, WMA(open, Period), open);
closeMA = CompoundValue(1, WMA(close, Period), close);
highMA = CompoundValue(1, WMA(high, Period), high);
lowMA = CompoundValue(1, WMA(low, Period), low);


haOpen = CompoundValue(1, ( (haOpen[1] + (openMA[1] + highMA[1] + lowMA[1] + closeMA[1]) / 4.0) / 2.0), open);
haClose = ((openMA + highMA + lowMA + closeMA) / 4.0) ;

plot o = haOpen;

thank you!
Related categories: Pine Script