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, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?