Position Size Calculator

Position Size Calculator

طاهر جلیلی

Position Size Calculator (MetaTrader indicator) tells you how many lots to trade based on:

  • Given entry and stop-loss levels
  • Risk tolerance
  • Account size (balance, equity, or even your savings account)
  • Account currency
  • Price of the quote currency (when different from account currency)

Its main features include:

  • Works with any trading instruments — currency pairs, CFDs, equities, indices, commodities, futures, cryptocurrencies.
  • Calculation inputs and results are displayed inside a graphical panel.
  • The panel can be moved freely across the chart.
  • You can easily close or minimize it.
  • All calculation parameters can be adjusted inside the panel in one or two mouse clicks.
  • Entry, stop-loss, and take-profit lines can be dragged directly on the chart.
  • You can choose to set stop-loss and/or take-profit as distance in points.
  • Alternatively, you can set them as multiples of ATR (Average True Range).
  • If take-profit is given, the calculator shows the potential reward level and the risk-to-reward ratio.
  • Supports pending and instant orders (easy switching).
  • You can even calculate risk based on a given position size.
  • You can see current and potential risk and reward profile.
  • Information about required margin is available in a separate tab.
  • Calculator can show the maximum position size based on available margin.
  • You can enter a custom leverage to calculate position margin based on it.
  • Detailed swaps (rollover interest) information is available in a separate tab.
  • Optional spread display.
  • Optional display of the pip value for the calculated position size.
  • The indicator automatically saves and loads its inputs on timeframe change or platform restart, preserving your configuration efforts.
  • Custom profiles restore panel's location, status, and settings.
  • Completely free and open-source project.
  • Does not require any DLL imports.
  • Can be used together with a trading script (PSC-Trader) to make it easy for traders to open positions based on the calculations. The trading script can also divide the position into several trades with different take-profit levels.

This indicator is an evolution of the free online tool by the same name. Position Size Calculator is available for both MT4 and MT5, but the MT5 version looks differently and provides better functionality because the platform itself is more advanced.

Interface

Main tab

The main tab of the panel provides the primary control over the indicator's functions and serves to output the most important calculation results — position size, risk, reward, and risk-to-reward ratio. The following controls and outputs are available:


  1. Indicator's version number.
  2. Spread value in ticks.
  3. Minimization button to fold down the panel.
  4. Close button to remove the indicator from the chart.
  5. Main tab switch — it is currently turned on.
  6. Risk tab switch — click it to see the current and potential risk profile. The Risk tab interface is explained below.
  7. Margin tab switch — click it to see everything related to required and free margin. The Margin tab interface is explained below.
  8. Swaps tab switch — click it to see the details on the swaps for the current trading instrument. The Swaps tab interface is explained below.
  9. Script tab switch — click it to see controls for the PSC-Trader script. The Script tab interface is explained below.
  10. Long/Short switch — enables you to quickly switch between long and short trade calculation.
  11. Entry input — grayed out when Instant order is used, can be used enter entry level when Pending order is set.
  12. Stop-loss input.
  13. Take-profit input.
  14. Take-profit button allows quick setting of TP to the level equal to the current SL value.
  15. Take-profit multiplier, if set via input parameters, applies to the current SL value when Take-profit button is pressed.
  16. Order type button to switch between Instant and Pending.
  17. Hide/show lines button to quickly switch the display of the Entry, Take-profit, and Stop-loss lines on the chart.
  18. Commission size per lot (one-way) — set it if your broker charges commission and you want it included into risk size when calculating position size.
  19. Account size in account currency units.
  20. Account size asterisk signals that additional funds are set via input parameters; the funds were added to the account size value.
  21. Account size button switches between balance, equity, and "Balance - CPR"; the latter being account balance less the current portfolio risk as calculated on the Risk tab.
  22. Risk input — you can set your tolerated risk in percentage of the account size. If you set your risk via Risk money input, percentage risk will be calculated based on that input.
  23. Risk money input — you can set your tolerated risk in account currency units. If you set your risk via Risk percentage input, money risk will be calculated based on that input.
  24. Risk (result) — percentage risk calculated based on the actual position size allowed in your broker's platform.
  25. Risk money (result) — money risk calculated based on the actual position size allowed in your broker's platform.
  26. Reward in account currency is based on the position size calculated without taking into account platform's restrictions.
  27. Reward (result) — reward in account currency is based on the actual position size allowed in your broker's platform.
  28. Reward/risk ratio (result) — reward result divided by risk result.
  29. Position size — actual position size calculation output. You can modify it yourself if you want to calculate your risk based on position size.
  30. Pip value per calculated position size.
  31. Reward/risk (input) — input reward divided by input risk.
  32. ATR Period — setting to use with the ATR-based SL/TP.
  33. ATR — current value of ATR with a given period.
  34. SL multiplier — multiplier for ATR-based stop-loss. The ATR value is multiplied by this value to produce the actual stop-loss distance. Set to zero to disable ATR-based stop-loss.
  35. TP multiplier — multiplier for ATR-based take-profit. The ATR value is multiplied by this value to produce the actual take-profit distance. Set to zero to disable ATR-based take-profit.
  36. ATR timeframe — timeframe to calculate ATR on. Click the button to switch between timeframes.

Risk tab

The risk tab can help you assess current and potential risk and reward profile. Using simple algorithm, the indicator calculates the risk of the currently open positions and pending orders based on their stop-loss levels (or lack thereof). It also assesses the potential reward of already opened positions and the position calculated by the indicator based on take-profit levels. The employed risk analysis method does not account for complex situations involving hedged orders and positions. You can use the Risk Calculator indicator for a deeper portfolio risk analysis. You can control the Risk tab using two checkboxes and see the calculation results in ten output fields:

  1. Count pending orders — if checked, the indicator will also attempt to calculate the risk of pending orders in addition to currently open positions.
  2. Ignore orders without stop-loss/take-profit — if checked, will simply ignore all risk coming from orders and positions without SL/TP value set. Can be useful if you prefer not to set stop-loss/take-profit for some of your trades.
  3. Current portfolio risk (currency) — shows the risk in currency units without the position that is currently being calculated by this indicator.
  4. Potential portfolio risk (currency) — shows the risk in currency units as if you have already opened a position that is currently calculated by this indicator.
  5. Current portfolio risk (%) — same as Current portfolio risk (currency) but in percentage to the account size.
  6. Potential portfolio risk (%) — same as Potential portfolio risk (currency) but in percentage to the account size.
  7. Current portfolio reward (currency) — shows the reward in currency units without the position that is currently being calculated by this indicator.
  8. Potential portfolio reward (currency) — shows the reward in currency units as if you have already opened a position that is currently calculated by this indicator.
  9. Current portfolio reward (%) — same as Current portfolio reward (currency) but in percentage to the account size.
  10. Potential portfolio reward (%) — same as Potential portfolio reward (currency) but in percentage to the account size.
  11. Current portfolio lots — the total size of the currently open positions in lots.
  12. Potential portfolio lots — the total size in lots of the open positions plus the one, which is currently being calculated by this indicator.

Margin tab

The margin tab provides information about the calculated position's margin, amount of used and available margin after opening the calculated position, and the biggest possible position size considering the current available margin and leverage. The tab has only one input and five output fields:


  1. Position margin shows the margin that will be used for the calculated position. Negative value means that the future used margin will be lower than the current due to lower requirement for margin of the hedged positions.
  2. Future used margin is calculated based on the current used margin and position margin.
  3. Future free margin shows how much free margin you will have left after opening the calculated position.
  4. Default leverage shows the account's actual leverage for your reference.
  5. Maximum position size by margin displays the biggest trade you can take with your currently available free margin and leverage.
  6. Custom leverage input lets you set your own leverage for all the margin calculations done by this indicator.
  7. Symbol leverage shows the actual leverage for the current trading instrument. It is calculated based on required margin and contract size/value. It may be inaccurate in some cases.

Swaps tab

The swaps tab displays details on the overnight interest payments associated with the current trading instrument and calculated position size. It shows swaps type, nominal swaps, daily, yearly, per lot, per calculated position size, and both for long and short positions:

  1. Type shows the type of swaps used by the broker for the current trading instrument. Can be one of several kinds: pips/points, base currency, interest, account currency, margin currency, reopening.
  2. Triple swap shows the day of week when triple swaps are charged/paid (to account for Saturday and Sunday).
  3. Nominal swaps — nominal swaps paid or charged by a broker for long and short positions.
  4. Daily swap per lot — daily swap paid or charged by a broker for long and short positions in account currency per lot.
  5. Daily swap per PS — daily swap paid or charged by a broker for long and short positions in account currency for calculated position size (on the Main tab).
  6. Yearly swap per lot — swap paid or charged by a broker for long and short positions in account currency per lot. Calculated for a period of 360 days.
  7. Yearly swap per PS — swap paid or charged by a broker for long and short positions in account currency for calculated position size (on the Main tab). Calculated for a period of 360 days.
  8. Position size duplicates the display of the position size calculated by the indicator on the Main tab.

Script tab

The script tab serves to provide you with some control over the trading script. You may skip this tab if you are not using PSC-Trader.


  1. Magic number — Magic number that will be assigned to the orders and positions opened using the script.
  2. Order commentary — commentary for orders and positions opened using the script.
  3. Disable trading when lines are hidden — a simple checkbox to prevent script from opening a position when you have chosen to hide the lines via the Main tab.
  4. Multiple take-profit levels — a number (set via ScriptTakePorfitsNumber input parameter) of take-profits to divide the position among. The first take-profit is always the same as the one set on the Main tab.
  5. Shares of to divide the position size — each take-profit level is assigned its percentage of the total position size calculated on the Main tab.
  6. Max slippage — maximum tolerable slippage value (in broker pips) that will be used in trading functions of the script.
  7. Max spread — the script will not trade if current spread is wider than the value given here.
  8. Max Entry/SL distance — the script will not trade if distance between the Entry level and Stop-Loss level becomes greater than this value.
  9. Min Entry/SL distance — the script will not trade if distance between the Entry level and Stop-Loss level becomes less than this value.
  10. Max position size — if calculated position size exceeds this value (in lots), the script will only open a trade of the size given in this field.
  11. Subtract open positions volume — if checked, the script will calculate the total open volume for a given trading instrument and will subtract it from the calculated position size, so the resulting volume after a new trade opens is equal to the calculated position size.
  12. Subtract pending orders volume — if checked, the script will calculate the total volume of all pending orders on a given trading instrument and will subtract it from the calculated position size, so the resulting volume after a new trade opens is equal to the calculated position size.
  13. Do not apply stop-loss — if checked, the script will open a trade without stop-loss. This can be useful if you use a separate expert advisor or some other means to trigger your stop-loss.
  14. Do not apply take-profit — if checked, the script will open a trade without take-profit. This can be useful if you use a separate expert advisor or some other means to trigger your take-profit.

Usage

Using this indicator is very simple if your main aim is to calculate the position size based on your stop-loss and current market parameters.

  1. Attaching Position Size Calculator to a chart will automatically set an entry level to the current price, preparing for a market buy order. Stop-loss level will be set to the nearest low. Take-profit will be turned off.
  2. Now, you can already use its position size output to enter a trade if you planned a market buy order with SL set to the low of the current bar and with 1% of balance risk. You can also change the position size field manually to calculate the risk based on its value.
  3. If not, you can freely change the stop-loss — either by dragging the stop-loss line on chart or by entering the value into the stop-loss input in the panel. You can also set stop-loss as distance in pips by turning on the respective input parameter.
  4. You can set take-profit the same way. Additionally, you can quickly set TP equal to the current SL value (or with some preset multiplier) by clicking the Take-profit button. Similarly to stop-loss, take-profit can be set as distance in pips if the respective input parameter is turned on.
  5. If you turn on ATR settings via the indicator's input parameters, you can also control the ATR values for stop-loss and take-profit calculation.
  6. Adding take-profit will turn on the display of Reward and Reward/risk ratio for your information.
  7. Switching the type of order from Instant to Pending (and backwards) is done with the order type button. When Instant order is used, the Entry level will trail the current price (Bid or Ask) and cannot be manually changed. When Pending order is used, the Entry level can be set either via panel's input or by dragging the chart line.
  8. The indicator will warn if the Entry level is too close to the current price in Pending order mode and if the Stop-loss or Take-profit level are too close to the Entry level.
  9. You can set the size of commission (one-way) applied by your broker if you want your potential loss to be calculated including this cost of trading.
  10. Switching account size from balance to equity or to balance minus portfolio risk can be useful in some cases and is done by a one or two clicks on the respective button.
  11. Adjusting the risk tolerance can be done in two ways: by setting percentage risk value or by setting money risk value. Both are done via input fields in the panel.
  12. Moving on to the Risk tab of the panel is completely optional and provides information about your current and potential risk and reward. You can control how pending orders and orders without stop-loss/take-profit are treated in this tab.
  13. Margin tab is not necessary too if your goal is to calculate the optimal position size based on your risk and stop-loss. This tab will inform you on amount of free and used margin resulting from your position. It will also show you what is the biggest position size that you can open with your current free margin and leverage. A custom leverage can be entered if need arises.
  14. Swaps tab can be consulted if you wish to know how costly the daily rollover will be for your position. It will be especially useful if you are using a carry trade strategy.
  15. Script tab will help you to control how the PSC-Trader script behaves if you use it for position opening.



نه گاو باشید و نه خرس. معامله‌گری باشید که از نبرد این دو کسب سود می‌کنید. طاهر جلیلی

Out of intense complexities intense simplicities emerge—Winston Churchill

در این مقالات سعی شده تا بصورت ساده و قدم به قدم شما را با #ارزدیجیتال #صرافی های داخلی و نحوه استفاده و خرید و فروش در آنها و آموزش #ترید در #بایننس #تحلیل_تکنیکال و هرچه مورد نیاز شما در این بازار می باشد. آشنا کنیم.

استفاده از این مقالات با ذکر منبع رایگان و بلامانع می‌باشد.


فهرست تمام پست‌ها

این آموزش‌ها توصیه و یا تشویق برای معامله یا دستوالعمل معاملاتی و یا مشاوره‌ی سرمایه‌گذاری نیستند. و به تنهایی برای انجام معامله کافی نیستند. همه آموزش‌ها در کنار هم به شما کمک می‌کند درک بهتری از بازارهای مالی و معامله کردن پیدا کنید.

استراتژی و سیستم خودتون رو شکل بدید. و با تحقیق کامل در مورد ریسک‌هایی که این بازارها دارند تصمیم به معامله کردن یا نکردن بگیرید.

با ارزهای رمزنگاری شده آشنا شوید و نحوه کار آنها را یاد بگیرید.

(PCT Systems (PerfectCryptoTraders

مفاهیم بنیادی


problem solving

تاریخچه پول

دفتر کل

دفتر کل توزیع شده

Blockchain بلاک‌چین

فول نود Node

توکن چیست؟

اتریوم

قراردادهای هوشمند

برنامه غیرمتمرکز (Dapp)

سوخت اتریوم چیست؟ ETH Gas Station

اصطلاحات بیتکوین

Proof of work یا اثبات کار

اثبات سهام Proof of stake

سیستم اثبات کار (PoW) و اثبات سهام (PoS) چه تفاوت‌هایی با یکدیگر دارند؟

چرخه های زمانی حرکت قیمت در بازار

4 stages of the market cycle

ذهنیت قیمت

هم‌نوایی بازیگران بازار

Compression befor the big jump

فارکس

بهترین زمان برای ترید در فارکس

جفت ارزهای اصلی

اسپرد و آربیتراژ

سوئینگ

MOMENTOM

مومنتم

What is momentum?

پروجکشن و عمق

سیر تا پیاز

از کجا شروع کنم

آموزش ثبت نام در پلتفرم دموی بایننس

آموزش جابه جایی ارزهای مجازی مابین صرافی های داخلی و کیف پول اکانت بایننس

استالر

Wallets

کندل استیک

دلار تتر چیست؟

Price action

HH HL -LHLL

ترند لاین یا خط روند

کانال‌های قیمت

نواحی حمایت و مقاومت

support and resistance levels

THE ASCENDING AND DESCENDING TRIANGLE CHART PATTERN

RISING AND FALLING WEDGES

Psychology behind Ascending and Descending Triangles Pattern

متاتریدر4

نصب متاتریدر4 و ساخت حساب دمو فارکس (حساب آزمایشی)

آموزش اضافه کردن اندیکاتور سفارشی به متاتریدر

مدیریت سرمایه و ریسک

MyfxBook.Com معرفی نحوه اتصال اکانت (سیر تا پیاز)

Position Size Calculator

اشخاص

Nick Szabo

Satoshi Nakamoto

ویتالیک بوترین


@PerFectCryptoTrader کانال تلگرام

@PerFectCryptoTraders گروه تلگرام

ثبت نام در صرافی نوبیتکس

ثبت نام در بایننس

لینک عضویت در سایت تردینگ ویو


Join me on TradingView, this place is awesome. If you eventually grab a paid plan, we each get $30 as a bonus! Use this link to sign up: https://www.tradingview.com/gopro/?share_your_love=Taherj

Twitter Telegram WhatsApp Gmail Instagram Instagram

BTC Address
1FMq4LHjw4Ps9U5z2CFnttfP2kHegYTwi9



Report Page