racer8

Cost Analysis Calculator [racer8]

racer8 アップデート済   
The Cost Analysis Calculator tells you whether it is ok to trade based on the costs of doing trade. It is a great risk management tool to use to avoid trades that have heavy costs which can negatively affect the chances of profitability. It takes into account commissions & spread cost. Based on your settings, if the cost is too high, the calculator will show you a sign that reads: "Trade cost is high :(". On the otherhand, if costs are low enough to trade, the calculator's sign will say: "Trade cost is low :)" giving you the green light to trade.

The ATR cost parameter defines the maximum amount of trade costs you are willing to take on. It defines the distance (in ATR units) needed to recover trade costs. For example, if the ATR cost parameter is set to 0.20, that means the indicator will only let you trade if costs are below 0.20 ATR. In other words, the price will have to move in the direction of your trade by 0.20 ATR units in order to break-even.
Below are the calculations I used to derive my formula for this indicator...I'm pretty sure these formulas have never been invented before...lol.

Spread cost = absolute value of (#units)*(Bid - Ask)
Total trade cost = commission fee + spread cost

What defines the profit needed to break-even?
Profit = (#units) * (Change in Price needed to profit)
Profit = (#units) * (Distance in ATR)

Profit > Total trade cost
(#units) * (Distance in ATR) > commission fee + spread cost
Distance in ATR > (commission fee + spread cost) / #units
M*ATR > (commission fee + spread cost) / #units

where M represents the ATR cost parameter set at a default value of 0.20 units.

As always, enjoy :D

リリースノート:
...
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?