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:
- Indicator's version number.
- Spread value in ticks.
- Minimization button to fold down the panel.
- Close button to remove the indicator from the chart.
- Main tab switch — it is currently turned on.
- Risk tab switch — click it to see the current and potential risk profile. The Risk tab interface is explained below.
- Margin tab switch — click it to see everything related to required and free margin. The Margin tab interface is explained below.
- Swaps tab switch — click it to see the details on the swaps for the current trading instrument. The Swaps tab interface is explained below.
- Script tab switch — click it to see controls for the PSC-Trader script. The Script tab interface is explained below.
- Long/Short switch — enables you to quickly switch between long and short trade calculation.
- Entry input — grayed out when Instant order is used, can be used enter entry level when Pending order is set.
- Stop-loss input.
- Take-profit input.
- Take-profit button allows quick setting of TP to the level equal to the current SL value.
- Take-profit multiplier, if set via input parameters, applies to the current SL value when Take-profit button is pressed.
- Order type button to switch between Instant and Pending.
- Hide/show lines button to quickly switch the display of the Entry, Take-profit, and Stop-loss lines on the chart.
- 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.
- Account size in account currency units.
- Account size asterisk signals that additional funds are set via input parameters; the funds were added to the account size value.
- 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.
- 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.
- 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.
- Risk (result) — percentage risk calculated based on the actual position size allowed in your broker's platform.
- Risk money (result) — money risk calculated based on the actual position size allowed in your broker's platform.
- Reward in account currency is based on the position size calculated without taking into account platform's restrictions.
- Reward (result) — reward in account currency is based on the actual position size allowed in your broker's platform.
- Reward/risk ratio (result) — reward result divided by risk result.
- Position size — actual position size calculation output. You can modify it yourself if you want to calculate your risk based on position size.
- Pip value per calculated position size.
- Reward/risk (input) — input reward divided by input risk.
- ATR Period — setting to use with the ATR-based SL/TP.
- ATR — current value of ATR with a given period.
- 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.
- 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.
- 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:
- Count pending orders — if checked, the indicator will also attempt to calculate the risk of pending orders in addition to currently open positions.
- 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.
- Current portfolio risk (currency) — shows the risk in currency units without the position that is currently being calculated by this indicator.
- 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.
- Current portfolio risk (%) — same as Current portfolio risk (currency) but in percentage to the account size.
- Potential portfolio risk (%) — same as Potential portfolio risk (currency) but in percentage to the account size.
- Current portfolio reward (currency) — shows the reward in currency units without the position that is currently being calculated by this indicator.
- 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.
- Current portfolio reward (%) — same as Current portfolio reward (currency) but in percentage to the account size.
- Potential portfolio reward (%) — same as Potential portfolio reward (currency) but in percentage to the account size.
- Current portfolio lots — the total size of the currently open positions in lots.
- 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:
- 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.
- Future used margin is calculated based on the current used margin and position margin.
- Future free margin shows how much free margin you will have left after opening the calculated position.
- Default leverage shows the account's actual leverage for your reference.
- Maximum position size by margin displays the biggest trade you can take with your currently available free margin and leverage.
- Custom leverage input lets you set your own leverage for all the margin calculations done by this indicator.
- 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:
- 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.
- Triple swap shows the day of week when triple swaps are charged/paid (to account for Saturday and Sunday).
- Nominal swaps — nominal swaps paid or charged by a broker for long and short positions.
- Daily swap per lot — daily swap paid or charged by a broker for long and short positions in account currency per lot.
- 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).
- 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.
- 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.
- 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.
- Magic number — Magic number that will be assigned to the orders and positions opened using the script.
- Order commentary — commentary for orders and positions opened using the script.
- 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.
- 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.
- 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.
- Max slippage — maximum tolerable slippage value (in broker pips) that will be used in trading functions of the script.
- Max spread — the script will not trade if current spread is wider than the value given here.
- Max Entry/SL distance — the script will not trade if distance between the Entry level and Stop-Loss level becomes greater than this value.
- Min Entry/SL distance — the script will not trade if distance between the Entry level and Stop-Loss level becomes less than this value.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Adding take-profit will turn on the display of Reward and Reward/risk ratio for your information.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
مفاهیم بنیادی
سوخت اتریوم چیست؟ ETH Gas Station
سیستم اثبات کار (PoW) و اثبات سهام (PoS) چه تفاوتهایی با یکدیگر دارند؟
چرخه های زمانی حرکت قیمت در بازار
Compression befor the big jump
بهترین زمان برای ترید در فارکس
سیر تا پیاز
آموزش ثبت نام در پلتفرم دموی بایننس
آموزش جابه جایی ارزهای مجازی مابین صرافی های داخلی و کیف پول اکانت بایننس
THE ASCENDING AND DESCENDING TRIANGLE CHART PATTERN
Psychology behind Ascending and Descending Triangles Pattern
متاتریدر4
نصب متاتریدر4 و ساخت حساب دمو فارکس (حساب آزمایشی)
آموزش اضافه کردن اندیکاتور سفارشی به متاتریدر
مدیریت سرمایه و ریسک
MyfxBook.Com معرفی نحوه اتصال اکانت (سیر تا پیاز)
اشخاص
@PerFectCryptoTrader کانال تلگرام
@PerFectCryptoTraders گروه تلگرام
Twitter Telegram WhatsApp Gmail Instagram Instagram