Buy sell for OBV() in PI


#1

Algos, strategies, code

Hi all,
PLEASE CORRECT THE CODE AND KINDLY WRITE ME THE CODE.
In PI software, the code is not working for OBV
Code is:

IN BUY
OBV(CLOSE)<450400
IN SELL
OBV(CLOSE)>1050500

Need buy when obv goes below 450500
And sell when obv goes abv 1050500

The code required for me is
Buy
When OBV of close comes below some xxxx level, buy should happen on next one minute candle at price of obv signal candle.
SL is 25pts from buy price

ShortSell
When OBV of close comes abv some yyyy level, shortsell should happen on next one min candle at close price of obv signal canfle.SL is 25pts from shortsell price.

Please write me a code.
Thank you.