TradingView
melodicfish
26 May 2023 12:18

Lot Size Calculator 

Wall Street 30 CashEightcap

Açıklama

This is a public release of my Lot Size Calculator. I received a request for the code from a user so I am republishing the script so I can make it public (TV doesn't seem to give me the option to simply make it public once published ).
This is a very simple script to use. Simply choose your entry level and stop level on the chart and the indicator will calculate the lots. You can change your account risk and base currency units in the settings along with changing the scaling of the calculation to adjust the results with the lot sizing units of your broker. This allows the calculator to be used with CFDs, forex, Gold, etc.. Hope it helps in your trading it has been the single most useful tool in my trading as it has helped me always keep my risk locked up and on point that is why I released it.
One final quick note: Remember you can save your settings for your own account size and risk so you do not always have to modify the defaults when loading the script. Just a ease of use tip. I only add the script to my chart when I am about to take a trade so it is helpful to have everything set up in advance.
Yorumlar
BroncoJet269
love it, thank you!!!
mouldyjulian
hi, sorry for seeming stupid, but to work on GOLD or BTCUSD how do you figure out what to change the "units per lot" to please?
melodicfish
@mouldyjulian, It's all good, The lots per contract can be confusing. For BTC it should be set on 1 and make sure you are on a btc/usd chart not btc/usdt. USDT is not a base unit currency added to the currency list. Even though they are basically equivalent, they are different from the scripts perspective. The basic math for BTC is risk/points so for example 500R/200points=2.5lots. The same for gold, example 500R/373points=1.34lots. You can check that you have the correct setting for the asset buy doing this simple calculation of the risk and make sure indicator lots match.
For gold the setting should be set to 100. This setting shifts the decimal place of the result so you just need to adjust it per asset. Hopefully this is a clear answer. let me know if it is not and I can try again.
Tiomario
Hi! How you manage to save the settings? Thank you
melodicfish
@Tiomario, At the bottom of the settings panel click the drop down menu that says "Default" and click "Save as default"
Tiomario
@melodicfish, Thanks
bdognegri
Wow this is awesome, thank you!!!
MarisKay
Fantastic and very needed tool. Would be great if it could automatically take the correct unit size for currently opened instrument (or at least make saving presets available). Also, is it possible to make it draggable? Once you put your entry and SL, adjusting by dragging would be very appreciated. Thank you!
melodicfish
@MarisKay, Too move it once on the chart, drag the anchors nodes in the corners. You can modify the SL this way. The TP is a set by the ratio variable this needs to be set in the indicator tab.
One could add a list of preset variables that could compare the active asset to the preset id and preset the lot variable based on the result. However there are a few other things that might effect the performance of a function like that. Feel free to play around with the code.
Daha Fazla