zzzcrypto123

Position Size Calculator

This is a script to make calculating position size easier. It calculates position size as a percentage of account balance and Risk/Reward based on input values of entry, exit, stoploss and shows the R/R box similar to tradingview's R/R tool. There is an option to toggle showing label and choosing of label text color.

Have to enter the following inputs in order for it to work properly
1. Account Balance : Account balance in either whatever is base currency of account
2. Risk % : Percentage of account balance to lose if stop is hit.
3. Entry
4. Stoploss
5. Target Price

Notes:
- Target Price is required for calculating R/R but is not necessary to calculate position size.
- Formula to calculate position size is : Balance * Risk % / SL %
- Formula to calculate R/R is : TP % / SL %
- SL % = ( Entry - SL ) / Entry * 100
- TP % = (TP - Entry ) / Entry * 100

Thanks to u/Chonky_ for help with feedback.
ملاحظات الأخبار: .
ملاحظات الأخبار: .
ملاحظات الأخبار: -Added a option to display Distance to stop/target & distance to stop/target in percent like the r/r tool.
-Also displays the R/R in middle similar to RR tool.
-There is a feature slightly hidden in this such that you can hover over the R/R Label and it will show the account balance, risk percentage & position size in a tooltip label. This is made possible by a new label type called tooltip that I didnt know existed till today. It's useful if in any case a user doesnt want to display account balance or position size on shared charts then can just disable the label on right side and only view it for himself via tooltip label.

also a shoutout to u/CUBYC who recommended above improvements.
ملاحظات الأخبار: .
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة

التعليقات

That's super cool script. Thank you! The only thing what i personally missing is to move it to the right a bit, because i already have fibo levels labels, which are overlapping, but sure can adjust it in script.
+1 رد
Super, thank for sharing!
+1 رد
Hello does this work on crypto only or also forex markets?
+1 رد
zzzcrypto123 Forex4lif3
@Forex4lif3 it should work on all markets, if you are facing any problems when using it with forex let me know what ticker i'll check on that
رد
Forex4lif3 zzzcrypto123
@zzzcrypto123, can the Entry, Stop Loss & Target Price be set to a dollar amount if so how? Thanks
+1 رد
zzzcrypto123 Forex4lif3
@Forex4lif3, you just have to modify the existing formulas within the code if you want it to display anything else, I dont really know much about forex but if you can provide me with an example of how it currently is and how you want it maybe i can take a look at it
رد
Forex4lif3 zzzcrypto123
@zzzcrypto123, I have no experience in coding, but having the formula(s) converted into a dollar amount would be best for me to calculate.
+1 رد
Can it be coded so that when I set up a position it automatically reads the entry TP and SL? Its a bit of a faff having to manually input the trade
+1 رد
zzzcrypto123 lovemoneylife
@lovemoneylife, sure you need to come up with clear methods of determining TP and SL automatically, then anything is possible. Also its open source so anyone is free to modify it however they want as per their own use
رد
callmealoser lovemoneylife
@lovemoneylife, hope this helps:
رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي كيف تعمل مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير الأصدقاء المُحالون العملات الافتراضية تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تُتابع رسالة خاصة المحادثة تسجيل الخروج