OPEN-SOURCE SCRIPT

DCA IN/OUT Calculator {RWCS}

130
Welcome to the DCA Calculator.

So you've been following your systems, and things are going good. Systems > Feelings.

You have your own Long/Short signals, and know when to hold cash and when to buy in.

Cool. Let's take it one step further.

This DCA calculator will rotate you in or out of your positions, landing you an average entry/exit price which is below/above the median price over a specified timeframe.

* Use the chart to set your preferred DCA timeframe.
* Once initialized, this strategy will fire a signal at the close of every candle.
Example: set chart to 1H, and the strategy will fire a signal every hour until you have exhausted the remaining capital. Pick 4H, 1D, 2D, 1W. Whatever you want, use the chart.

Calculator Mode:

Buy:
So your holding cash, but your system went long. Time to buy in. You have the asset in mind and the allocation of your capital is ready to go.
1) Load this strategy up. Set Calculator Mode to "Buy".
2) Input the total capital you have available for this asset.
3) Input the Allocation % you want to DCA in with on each signal. (This is 0 line, actual allocation % will differ each bar based on price action. Recommend 10%, play around and find out).
- Now the strategy will signal a buy in value on the close of each candle.
- It will do this until your remaining capital is fully allocated.

* At this point you will be fully allocated at an average entry price lower then the median price over that specified time period.

Sell:
So your fully allocated to your systems, which have just gone short. Time to sell.
1) Load this strategy up. Set Calculator Mode to "Sell".
2) Input the total capital you currently have invested into that asset.
3) Input the Allocation % you want to DCA out with on each signal. (This is 0 line, actual allocation % will differ each bar based on price action. Recommend 10%, play around and find out).
- Now the strategy will signal a sell out value on the close of each candle.
- It will do this until your remaining capital is fully rotated into cash.

* At this point you will be fully rotated into cash at an average exit price higher then the median price over that specified time period.

Nothing is perfect. Nothing is guaranteed. We are simply stacking probability's to give ourselves the best chance at an optimal outcome.

God Speed.

RWCS_LTD

Introduced some code clean up to the calculations.
Thank you Dark

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.