Crash101

Trader
Jul 25, 2021
25
2
19
49
Any chance of adding an option for spread addition for sell positions on stop loss position?

Awesome work brother. Thanks for this good Expert Advisor.

Crashcourse!!
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,829
981
144
Odessa
www.earnforex.com
The Position Sizer EA has been updated to version 3.02 to fix some bugs and make some minor changes:
  1. Fixed a bug that could result in wrong position size calculation when switching the chart's symbol in MT5. (Via a Github issue.)
  2. Fixed the Commentary and Auto-Suffix fields which weren't working correctly in MT5. (@CARPARK)
  3. Fixed a bug that prevented newly set default input parameters to change the respective fields on the panel.
  4. Fixed a bug that could result in reward-related Main tab elements to show up when some other tab was selected.
  5. Fixed a bug that sometimes prevented the Position Size field change from registering when the panel was calculating the Risk based on the Position Size.
  6. Moved the ShowATROptions input parameter to the Compactness inputs group.
  7. Removed the redundant Stop Price Label Color input parameter as there is no such label in MT5.
  8. Made some purely cosmetic changes.
 
  • 👍
  • 🎉
Reactions: EnrichWave and CARPARK

LittleBB

Newbie
Sep 17, 2021
13
1
4
48
Enivid, I'm very grateful for all of your work on this program. Thank you!

Edit: I noticed an alert message popping up that said Position Size Calculator Not Found after successfully compiling everything.

The fix for me was to delete the old indicator and old script. Restart MT5 and no more error message!

Does anyone know if there is a way to have Position Sizer load settings from a settings file automatically? The settings screen lets you save settings to a file but when I do, the next time I start Position Sizer, I have to click the Load button. Ideally, I'd like it to grab my default settings.
 
Last edited:

pepperb

Newbie
Aug 8, 2022
8
0
2
47
@pepperb It appears that you are attempting to open a Stop Limit order with Stop price being set at some odd level (1.229 is very low of USD/JPY).
That actually helps a lot. I don't know why it was trying to include the Stop Limit in there, as I was always and only doing Market (Instant) orders. But it looks like sometimes it would keep the entry price from a different pair and apply it, even if I didn't use that option. Like it's sending a market and stop limit at the same time. Once you pointed that out, I just made sure that the "Stop Limit" price box was empty as I cycled through "Pending...Stop Limit...Instant" and it works now. Never would have found that as the problem, so THANKS!!!
 

cxskate

Trader
Aug 12, 2022
5
0
6
40
This is a wonderful tool. I have still been using the 2.xx version though because I can enter trades while still seeing my main (risk) panel. If there was an enter trade button in the main panel that would be awesome for me.

What would REALLY ROCK though is if there were a way to set a target for break even (also accounting for commission).. Say you drug your first TP line to your target.. The software would calculate what size to make that trade (number 1 of 2 or more) so that when that TP was hit your profit would put you at break even if your stop loss was then hit for the remaining positions you entered with. It's hard to do this with the current tool, the math gets screwy when your stop loss varies.
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,829
981
144
Odessa
www.earnforex.com
That actually helps a lot. I don't know why it was trying to include the Stop Limit in there, as I was always and only doing Market (Instant) orders. But it looks like sometimes it would keep the entry price from a different pair and apply it, even if I didn't use that option. Like it's sending a market and stop limit at the same time. Once you pointed that out, I just made sure that the "Stop Limit" price box was empty as I cycled through "Pending...Stop Limit...Instant" and it works now. Never would have found that as the problem, so THANKS!!!
Looks like a bug. I will look into it.
This is a wonderful tool. I have still been using the 2.xx version though because I can enter trades while still seeing my main (risk) panel. If there was an enter trade button in the main panel that would be awesome for me.
You can still use a hotkey to trade even when the Main tab is selected.
 

cxskate

Trader
Aug 12, 2022
5
0
6
40
Looks like a bug. I will look into it.

You can still use a hotkey to trade even when the Main tab is selected.

I did realize and see that! Still I did prefer the psc trader and the mouse my friend. What did you think of the take profit to bring stop loss balance to break even? Seems like very hard math but an incredible product
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,829
981
144
Odessa
www.earnforex.com
I did realize and see that! Still I did prefer the psc trader and the mouse my friend. What did you think of the take profit to bring stop loss balance to break even? Seems like very hard math but an incredible product
I'm not sure that's a good practice to enable in traders with the PS, but I will think if it is possible to implement without making it stand out.
 

Crash101

Trader
Jul 25, 2021
25
2
19
49
Enivid,

Thanks. Are you able to describe the functionality that is improved with MT5? Been using MT4 so far. Before I change, it would be helpful to understand the benefits from using the MT5 version?

Thanks for your help.

Alex
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,829
981
144
Odessa
www.earnforex.com
Thanks. Are you able to describe the functionality that is improved with MT5? Been using MT4 so far. Before I change, it would be helpful to understand the benefits from using the MT5 version?
There isn't a big difference between the two if we are talking purely about the Position Sizer. The biggest advantages I can think of are:
  • In the MT5 Position Sizer, hotkeys work without issues.
  • An arrow for trade direction instead of the "Long/Short" label.
  • Support for position sizes lower than 0.01 (if your broker supports that).
EDIT: Forgot to mention the support for Stop Limit orders in MT5.
 

cxskate

Trader
Aug 12, 2022
5
0
6
40
I'm not sure that's a good practice to enable in traders with the PS, but I will think if it is possible to implement without making it stand out.
In every trade group I'm in they sell 20% at 1:4 but with commissions it isn't accurate at all. Plus the opposing demand/supply to get through would be the most accurate place to get to break even.
 

cxskate

Trader
Aug 12, 2022
5
0
6
40
In every trade group I'm in they sell 20% at 1:4 but with commissions it isn't accurate at all. Plus the opposing demand/supply to get through would be the most accurate place to get to break even.


How about a checkbox in the scripts tab that says "Take Profit 1 removes risk". It would automatically change the percentage of the position split and update as your drug the lines. You could use a little extra math to account for the remaining risk being less after Take Profit 1 was achieved, and account for commissions.
 

CARPARK

Trader
Mar 29, 2021
31
6
24
45
Hi Envid, thanks for fixing comments on multi trades.

I am using PS to scalp M1 timeframe. If a SL is particularly small, then the position size in panel will be red and broker will not allow me to take the trade. I know of the 'use max PS' button, however, if you use the button and then change your SL to be bigger (and lowering your lot size to within broker limits), the lot size does not change automatically (so you will be grossly over-risking if you are not aware). Clicking the Max PS button does not 'undo' the max PS, it leaves PS at broker max regardless of your SL. Changing your risk fixes this. But given the speed of some of the trading I am doing I have missed one trade this morning (not blaming, just outlining that it is an issue).

But maybe I am using PS incorrectly?

What would be great is a 'use max position size broker will allow' true/false setting maybe? So it will use the max allowable PS if it's a small SL, but also adjust as normal if the SL is widened, without needing any manual intervention.
 

EnrichWave

Master Trader
May 15, 2018
167
38
54
India
the position size in panel will be red
because the broker has higher stops level. we can blame broker for this. (right click on that instrument and click specifications, you can see stops level. It'll vary broker to broker). for example. If your broker stop level is 50 and you are trying to open order EURUSD 1.32132 with SL 1.32128 you cant place orders.
'use max PS' button, however, if you use the button and then change your SL to be bigger (and lowering your lot size to within broker limits), the lot size does not change automatically
If you use Max PS button. It sets the maximum allowed size (equity or max volume position allowed for that instrument). So when you move your SL's it won't change because It set to Max PS. If you want change your position size according your SL, you have to go for Risk % or Risk USD,

The " Max PS" is for always set maximum allowed position size.
 
Last edited:

CARPARK

Trader
Mar 29, 2021
31
6
24
45
If you use Max PS button. It sets the maximum allowed size (equity or max volume position allowed for that instrument). So when you move your SL's it won't change because It set to Max PS. If you want change your position size according your SL, you have to go for Risk % or Risk USD,

The " Max PS" is for always set maximum allowed position size.
Perhaps I have found a bug/feature then: clicking button again does not revert behaviour back to standard lot sizing, that would be my expectation. But perhaps I am wrong?
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,829
981
144
Odessa
www.earnforex.com
Hi Envid, thanks for fixing comments on multi trades.

I am using PS to scalp M1 timeframe. If a SL is particularly small, then the position size in panel will be red and broker will not allow me to take the trade. I know of the 'use max PS' button, however, if you use the button and then change your SL to be bigger (and lowering your lot size to within broker limits), the lot size does not change automatically (so you will be grossly over-risking if you are not aware). Clicking the Max PS button does not 'undo' the max PS, it leaves PS at broker max regardless of your SL. Changing your risk fixes this. But given the speed of some of the trading I am doing I have missed one trade this morning (not blaming, just outlining that it is an issue).

But maybe I am using PS incorrectly?

What would be great is a 'use max position size broker will allow' true/false setting maybe? So it will use the max allowable PS if it's a small SL, but also adjust as normal if the SL is widened, without needing any manual intervention.
The Max PS button does one thing only - it sets the position size to the maximum possible considering your current available margin. It completely disregards SL and Risk settings.

The only way to switch back to Risk-based calculation. You can do that by setting either a percentage risk or a currency risk. If you want to be able to do it quicker, you can always add the Quick Risk buttons (via the QuickRisk1/QuickRisk2 input parameters).
 
  • 👍
Reactions: CARPARK