• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 4:33am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:33am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Account size and trading size 12 replies

Which would you prefer: increasing lot size or TP size? 21 replies

At what lot size/account size do you have scale issues? 35 replies

Point equivalent is calculated with the account size or traded size? 4 replies

Lot size, contract size, max position ? 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 12
Attachments: MaxLot size indicator needed
Exit Attachments

MaxLot size indicator needed

  • Last Post
  •  
  • Page 1 2
  • Page 1 2
  •  
  • Post #1
  • Quote
  • First Post: Nov 18, 2020 3:56am Nov 18, 2020 3:56am
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Hi guys,
Already asked at mql5 forum without luck. Hope somebody here can help.

I have been using for months this MT4 indicator (https://www.mql5.com/en/market/product/42419), however, after a recent windows 10 update it is no longer working.

Does anybody have an alternative/similar MT4 indicator to share here?

What I need is NOT an indicator that calculates the max lot size depending on a certain risk %, or certain take-profit levels, or at certain stop-loss levels... I need a very simple indicator that would just tell me how many lots I am able to buy with the available free margin on my account. This is what the above indicator used to do... before this windows 10 update.
Also, I need an indicator rather than a script. I want to place the indicator in my template and have the number of lots immediately available, rather than having to throw in a script every time I need this number.
Thanks in advance.
  • Post #2
  • Quote
  • Nov 18, 2020 4:47am Nov 18, 2020 4:47am
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Attached File
File Type: ex4 max_lot_size_indi.ex4   6 KB | 75 downloads


coded this up from bed with air mouse(2am here)...if there are any problems ,ill fix once im up.
1
  • Post #3
  • Quote
  • Nov 18, 2020 5:15am Nov 18, 2020 5:15am
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Hey mtbb,
you r amazing... and very fast... I have all my margin currently in a trade... so, cannot tell if it works correctly. It does show 0.0 at the moment, which is correct, as my freemargin = 0.
Could you please just introduce a feature to change the corner. It now appears in the upper left corner and interferes with (is actually hidden behind) the trade panel. I will need it in the upper right corner.
Thanks so much man :-)
  • Post #4
  • Quote
  • Nov 18, 2020 5:42am Nov 18, 2020 5:42am
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Hey mtbb,
just noticed that every time I change the timeframe it takes about 4-5 seconds for the indicator to show up on the screen. For example, changing from D1 to H1, I wait 4-5 seconds to see the indicator and then changing back to D1, I have to wait again 4-5 seconds to see the indicator... ideas how to correct this?
  • Post #5
  • Quote
  • Nov 22, 2020 3:04pm Nov 22, 2020 3:04pm
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Hey Ross.. I did this late that night from bed and totally forgot to come back and check.. Im glad i did-- there was a bug in the first version(dont code from bed lol)

Here is the new Version... You'll now see there are inputs for delay amount/use delay/color/corner/text size...

As for the 5 second delay.. I had put that in on purpose... I really try to make my indi/ea's light on the system.. If you go by tick-- the function can run up to 100k a day or more(how ever many ticks there are for that day).. Vs running once every 5 seconds = way less hits on the cpu..

But i changed the delay to a input option.. So now if you have delay =true.. it will place the max size amount on the screen right when you put the indi on the chart and then check every 5 seconds after that = less hits on the cpu..

If you do delay=false.. It will check every tick.. Up to you how you want to do it..
Attached File
File Type: ex4 max_lot_size_indi_V(2).ex4   10 KB | 42 downloads
  • Post #6
  • Quote
  • Nov 22, 2020 3:36pm Nov 22, 2020 3:36pm
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Here i normalized the lot size so it only shows 2 decimal spaces..
Attached File
File Type: ex4 max_lot_size_indi_V(3).ex4   9 KB | 54 downloads
  • Post #7
  • Quote
  • Nov 22, 2020 3:39pm Nov 22, 2020 3:39pm
  •  Barraka
  • | Joined Jul 2017 | Status: Member | 152 Posts
Quoting mtbb
Disliked
Hey Ross.. I did this late that night from bed and totally forgot to come back and check.. Im glad i did-- there was a bug in the first version(dont code from bed lol) Here is the new Version... You'll now see there are inputs for delay amount/use delay/color/corner/text size... As for the 5 second delay.. I had put that in on purpose... I really try to make my indi/ea's light on the system.. If you go by tick-- the function can run up to 100k a day or more(how ever many ticks there are for that day).. Vs running once every 5 seconds = way less...
Ignored
For this type of app, it makes more sense to have it as a script, since you're only running it once (presumably). There's no need to update the max lot size per tick. With the added benefit of being more lightweight.
  • Post #8
  • Quote
  • Nov 22, 2020 5:32pm Nov 22, 2020 5:32pm
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Though i agree... OP asked for indi and didnt want a script... I can see it -- if your placing trades all over the place --- you want to just "know what is going on "..


Either way.. Here is a script for those that would rather use a script... after 10 seconds it removes the max lot amount from the chart so you dont have to keep seeing that in the lower corner.. ..
Attached File
File Type: ex4 max_lot_size_script_V(1).ex4   7 KB | 48 downloads
1
  • Post #9
  • Quote
  • Nov 26, 2020 3:59pm Nov 26, 2020 3:59pm
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Quoting mtbb
Disliked
Here i normalized the lot size so it only shows 2 decimal spaces.. {file}
Ignored
Hay mttb, just wanted to say a HUGE thank you !!! Works like a charm. My charts are relatively bare, laptop has 16 RAM, so... I see no issues with speed or system being in any difficulty. Indeed, as soon as I open a chart and want to enter a trade, I need to know how much I can buy... I do not do money management... calculating % risk, % of free margin to use, etc. etc. If I see a trade, then I just go full in... I know, I know, a lot of people would say this is stupid... and be it.. that's me... So, again, thanks a lot! The indi is now part of my template.
  • Post #10
  • Quote
  • Nov 28, 2020 10:53pm Nov 28, 2020 10:53pm
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Rosspetx.. Glad its what you were looking for...


Anyone else downloading either the indicator or script--- be sure to download the last versions.. Not sure why, but i cant edit my first posts to remove the older versions...
  • Post #11
  • Quote
  • Nov 29, 2020 3:49pm Nov 29, 2020 3:49pm
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Quoting mtbb
Disliked
Rosspetx.. Glad its what you were looking for... Anyone else downloading either the indicator or script--- be sure to download the last versions.. Not sure why, but i cant edit my first posts to remove the older versions...
Ignored
Hi mttb, sorry, me again with something more specific... The indi works great, however, I have the impression that you are using either the balance or the equity for the calculations, whereas I think it is better to use the free margin for these calculations. For example, if I have bought with half of my balance a pair and then want to enter another trade for another pair, I need to know how much I can buy with the remaining free margin, whereas at the moment your indi keeps showing the number of lots possible to be bought with the whole balance/equity... which is actually not available.
So, it is it possible to make it calculate using free margin?

In another note, is there any reason why you prefer to share the ex4 file rather than the mq4? Is the code that precious?
  • Post #12
  • Quote
  • Dec 4, 2020 3:49pm Dec 4, 2020 3:49pm
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
calc with Free Margin . Now, shows the free margin on the screen next to max lot size.. You can also turn off showing Margin in the indicator..
Attached Files
File Type: ex4 max_lot_size_indi_V(4).ex4   11 KB | 53 downloads
File Type: ex4 max_lot_size_script_V(2).ex4   8 KB | 42 downloads
1
  • Post #13
  • Quote
  • Dec 6, 2020 9:26am Dec 6, 2020 9:26am
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Quoting mtbb
Disliked
calc with Free Margin . Now, shows the free margin on the screen next to max lot size.. You can also turn off showing Margin in the indicator.. {file} {file}
Ignored
Brilliant mtbb !! Great idea also to add the actual free margin to show next to the max lot size. Thank you so much!!
Wish you success in your trading!!
  • Post #14
  • Quote
  • Dec 7, 2020 1:02pm Dec 7, 2020 1:02pm
  •  Trader-IT
  • | Joined Sep 2019 | Status: Member | 234 Posts
Quoting mtbb
Disliked
calc with Free Margin . Now, shows the free margin on the screen next to max lot size.. You can also turn off showing Margin in the indicator.. {file} {file}
Ignored
Thanks mttb. Practical and useful tool.

For your information only:
- installed on 3 screen chats (EU-GY-GC)
- activated two simultaneous orders one on gbpjpy and one on gbpchf
- closed the order on gbpjpy via trailing stop and .....
this has become the display of your instrument on all three charts, until the order is closed (manual).
Attached Image

Accuracy is fine, but 12 digits after the decimal point are not excessive?

Seriously.... that's okay with me too. As well as good, the possibility of positioning the indicator at the 4 corners.
However, having all four corners occupied by another (they cannot be positioned too), as you can see it is wedged between two other things.

A positioning via X and Y would be great, but maybe that's too much work.
I hope you can modify it and - anyway - thank you for your effort.
I've seen things you people wouldn't believe
  • Post #15
  • Quote
  • Dec 7, 2020 1:50pm Dec 7, 2020 1:50pm
  •  Trader-IT
  • | Joined Sep 2019 | Status: Member | 234 Posts
Quoting Trader-IT
Disliked
{quote} Thanks mttb. Practical and useful tool. For your information only: - installed on 3 screen chats (EU-GY-GC) - activated two simultaneous orders one on gbpjpy and one on gbpchf - closed the order on gbpjpy via trailing stop and ..... this has become the display of your instrument on all three charts, until the order is closed (manual). {image} Accuracy is fine, but 12 digits after the decimal point are not excessive? Seriously.... that's okay with me too. As well as good, the possibility of positioning the indicator...
Ignored
Forgive me, but I also wanted to test on a demo account (this time).
This is what I have verified. Just for your knowledge.
Thanks
Attached Image (click to enlarge)
Click to Enlarge

Name: Immagine 2020-12-07 180136.png
Size: 28 KB
I've seen things you people wouldn't believe
  • Post #16
  • Quote
  • Dec 10, 2020 3:38am Dec 10, 2020 3:38am
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
darn,i wanted Accuracy to the 16th place..lol

ill fix it in the morning when i get up...should only be 2 decimal points ...
1
  • Post #17
  • Quote
  • Dec 11, 2020 2:37am Dec 11, 2020 2:37am
  •  mtbb
  • | Joined Apr 2015 | Status: Member | 88 Posts
Attached File
File Type: ex4 max_lot_size_indi_V(5).ex4   11 KB | 45 downloads
Attached File
File Type: ex4 max_lot_size_script_V(5).ex4   8 KB | 33 downloads
1
  • Post #18
  • Quote
  • Dec 12, 2020 8:13am Dec 12, 2020 8:13am
  •  Trader-IT
  • | Joined Sep 2019 | Status: Member | 234 Posts
Quoting mtbb
Disliked
{file}{file}
Ignored
Thanks mtbb.
Only tried for a few minutes on Friday (indy), but it looks like it's ok now.
I've seen things you people wouldn't believe
  • Post #19
  • Quote
  • Dec 19, 2020 11:17am Dec 19, 2020 11:17am
  •  Trader-IT
  • | Joined Sep 2019 | Status: Member | 234 Posts
Quoting mtbb
Disliked
{file}{file}
Ignored
Hi mtbb.
Sorry to continue with bad news.
This post is for information only, on how the indicator works. No criticisms or requests.

I use this indicator on three charts simultaneously on the screen.
a currency, gold and an index.
Also I am a full time manual trader, opening several trades per day. So it is very important for me to always have in view the quantity available for each instrument, for to add or mediate orders. This allows me a safe management.

Unfortunately, the indicator is deleted from the chart when I change profile (or restart the MT4), leaving however the printing of the last data on the chart.

This forces me to re-insert and set (color and position) for three times, this indicator.
I can't use the script, because I already have three EAs and three management scripts running. Forgive me, but I don't want to add three more.

Thanks for your attention and previous help.
I've seen things you people wouldn't believe
  • Post #20
  • Quote
  • Dec 25, 2020 9:57am Dec 25, 2020 9:57am
  •  rosspetX
  • | Joined Jul 2017 | Status: Member | 95 Posts
Quoting Trader-IT
Disliked
{quote} Hi mtbb. Sorry to continue with bad news. This post is for information only, on how the indicator works. No criticisms or requests. ...Unfortunately, the indicator is deleted from the chart when I change profile (or restart the MT4), leaving however the printing of the last data on the chart. This forces me to re-insert and set (color and position) for three times, this indicator. I can't use the script, because I already have three EAs and three management scripts running. Forgive me, but I don't want to add three more. Thanks for your...
Ignored
I noticed similar behavior, too (I use the indicator, not the script); however, I thought that this was due to a couple of scripts I am using to close my orders. In my case, the indicator simply disappears (is deleted) from my template and I thought applying the scripts was doing this. And, yes, it leaves behind the last printed number.
Since I have the indicator as part of my default template, I simply reapply the template and within a couple of seconds I have it back on the chart. When trading restarts after Xmas, I will check whether, indeed, just changing the profile will delete the indicator. I have not noticed closing and restarting mt4 to cause this... but will check again during a trading day.
1
  • Platform Tech
  • /
  • MaxLot size indicator needed
  • Reply to Thread
    • Page 1 2
    • Page 1 2
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021