I need a Tradingview strategy for backtesting purposes.
I need the pinescript code to be written from scratch. These are the rules of the strategy:
1 - Weekly MACD above the Signal line
2 - weekly MACD above the Zero line
3 - Daily MACD above the Signal line
4 - Daily MACD above the Zero line
5 - Set a buy order above the high of the last closed candle
6 - If the purchase order is not activated and buy condition is still active, update the Buy order above the high of the new closed candle (this is a Trailing Stop Buy effect)
7 - Daily MACD crosses down the Signal line
8 - Set a stop loss order below the low of the last closed candle.
9 - If the stop loss order is not triggered, update it whenever the daily MACD makes a cross down the Signal line. (This is a Trailing stop loss effect)
I also need:
10 - Code to apply the Kelly criterion to the position sizing, based on manually set parameters. Parameters:
Win% / Average Loss - (1 - Win%) / Average Win
11 - Code to pyramiding the positions (averaging up) when the daily MACD cross up to the Signal line and there are other open positions. Size of pyramiding positions: first position 57%, 29% second position, third position 14%.
I wish that the conditions 1, 2, 3, 4, 10, 11 can be activated or deactivated at will with a tick and that the timeframe of the MACD used (weekly and daily) can be modified (f.e. into monthly and weekly)
Let me know if you need further details ?
Let me know your budget and timing estimate, thank you so much!
Bu iş için 12 freelancer ortalamada €247 teklif veriyor
I am a professional pinescript developer. I have made a lot of pinescript already. I can start just, no question. I can deliver within 3days with 180eur budget Can we discuss more detail ? thank you.