TradingView
trananhvu149
May 9, 2021 1:21 PM

Simple Lot Size Calculator 

U.S. Dollar/Japanese YenFXCM

Description

A simple script to calculate lot size for USD balance account.
Input the number of SL pips into the Indicator setting to get the result.

Release Notes

Support fraction pip size.
Comments
Metacap
How can I move the output on my screen? Lets say to the right corner
ScepticalSloth
In case this could help others, I edited the following to add the output directly on the chart and move it further away from the current candle. Disclaimer: I'm not a programmer, so if this modification has negative impact on the original indicator, don't hesitate to advise. And big thank you to original author for a very simple yet super helpful indicator:

Line 2: study("Lot Size", overlay=true)

Line 34: label.set_xy(resultLabel, time+(time-time[1])*75, ohlc4)
ScepticalSloth
For the more adventurous, you could try this too:
1. Delete or comment out line 15 to 34
2. Add the following code:

var testTable = table.new(position = position.top_center, columns = 1, rows = 1, bgcolor = color.gray, border_width = 1)
if barstate.islast
table.cell(table_id = testTable, column = 0, row = 0, text = "Lot size: " + tostring(lotSize, '#.##'), text_color = color.white)
alvenmaretinus
Thank you, you're a life saver!
oanhdn72
papacuppa
Thanks for this, helps a lot. Just in case somebody needs decimal places you can swap integer for float.
AbouMoustaf
Can you please type how can I move to the top corner for example ? I don't want it to be on the bottom side Like that..
Great work tho, thanks <3
reza1224
ttt
pspvhp3
Hì, thank you bro.
a_abramcristales14
I see that it's not available for XAUUSD, any way of seeing the lot size?, the square just shows an empty field
More