Code a Pine Script strategy for Tradingview

Job ID: 33760226

Budget: €30 – €250 EUR

I need a Tradingview strategy to use for backtesting purposes.

My strategy works as follow:

(Buy condition)
If:
Set a buy order over the last closed candle if:
- Weekly Oscillator is bullish.
- Daily Oscillator is bullish.
Then:
- Set a buy order over the last closed candle
- If the buy order is not triggered on new closed candle, then update the buy order over the new closed candle.

(Sell condition)
If:
- Daily Oscillator crosses down.
Then:
- Set a stop loss order under the last closed candle.
- If the stop loss order is not triggered, update it everytime the Daily Oscillator crosses down.

I need also:
- Code to backest the Kelly Criterion for position sizing.
- Code to average up positions (pyramiding) when buy condition is met multiple times.

I would like the various conditions to be activated at will.
Related categories: Pine Script Trading