Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
Discuss the Position Sizer expert advisor here. This EA lets you calculate optimal position size and execute trades based on these calculations. Based on Position Size Calculator, it allows some additional control over the trades it opens. You can ask any questions about this free MetaTrader tool here.
 
  • 👍
Reactions: Raster

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
Main changes in the version 3.00 compared to the version 2.42 of the Position Size Calculator:
  1. The indicator converted to the EA.
  2. Added a color warning for incorrect volume shares when multiple take-profits are used.
  3. Changed the default Magic number input parameter to a non-zero value.
  4. Changed the default Ask for confirmation checkbox state to ticked.
  5. Fixed a bug that prevented PSC from removing the TP when ATR TP multiplier was set to 0.
  6. Fixed a bug when if only stop-loss is set to points display (SLDistanceInPoints = true while TPDistanceInPoints = false), dragging the SL line stopped working.
  7. Added checkboxes to apply spread adjustment to SL and TP in ATR multiplier mode. (@Crash101)
  8. Fixed an issue with additional TP/SL line labels when account size is zero. (@saleh222)
  9. Fixed multiple potential zero divide errors. (@gut)
  10. Added an input field to the Trading tab to limit the maximum number of trades to prevent opening too many trades. (@Armin)
  11. Fixed a bug with Entry/SL/TP lines deselecting on the platform's restart.
  12. Added the SymbolChangeReset input parameter to make the panel reset its fields to the defaults from the input parameters if the current chart's symbol is switched to another symbol and then back. (@EnrichWave)
  13. Fixed (almost) a potential narrow price scale when adding the Position Sizer to a wide-quote symbol. (Via two Github issues: 1, 2.)
  14. Fixed a potential problem with calculations when switching the chart's symbol.
 
  • 🎉
Reactions: EnrichWave

EnrichWave

Master Trader
May 15, 2018
168
38
54
India
Fantastic..
The current setting "Max Position Size" should be as "Fixed Position size"..
If there is option "Max Allowed Position size" for "per symbol" and "All symbols" will be more helpful.

Regards.
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
Fantastic..
The current setting "Max Position Size" should be as "Fixed Position size"..
If there is option "Max Allowed Position size" for "per symbol" and "All symbols" will be more helpful.

Regards.
Yeah, I agree. I will try to combine this with the max number of trades.
 
  • 🎉
Reactions: EnrichWave

EnrichWave

Master Trader
May 15, 2018
168
38
54
India
Yeah, I agree. I will try to combine this with the max number of trades.
Thank you so much for considering the important feature @Enivid .
I checked the Trade Hot Key. without the Ctrl+Shift also it places orders while we press "t". I changed to other keys It is works without pressing the Key combination. (Works only when we set the TradeHotKey value to upper case ).
Thank you soooooooooo much for the wonderful effort @Enivid . Lots of love

Regards
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
I checked the Trade Hot Key. without the Ctrl+Shift also it places orders while we press "t". I changed to other keys It is works without pressing the Key combination. (Works only when we set the TradeHotKey value to upper case ).
Is that MT4 or MT5? You mean you set it something like "Ctrl+Shift+t" and it works even you just press "t"?
 

EnrichWave

Master Trader
May 15, 2018
168
38
54
India
Sorry... I miss understood the Key combination. We have to add Shift+ Necessary Key...

PS: But with the small letter key mention is not working. If we mention like "Shift+g" it wont work
 
Last edited:

JoeBull

Newbie
Jul 27, 2022
4
0
1
43
Hello,

Would like to use breakeven funtcion on eurusd at sell order 1. Move SL to BE at +40 pips. And a higher level another sell order 2. Move SL to BE at +35 pips.

Where can I find magic numbers for a defined sell order to let the EA manage my opened trades.

Thank you!
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
Would like to use breakeven funtcion on eurusd at sell order 1. Move SL to BE at +40 pips. And a higher level another sell order 2. Move SL to BE at +35 pips.

Where can I find magic numbers for a defined sell order to let the EA manage my opened trades.
@EnrichWave has answered your question, I would like to add that the trade has to be opened by an EA or a script for it to have some magic number attached. The trades you open manually don't have magic numbers.
 

kamthind

Newbie
Jul 27, 2022
6
2
4
34
Hello,

I am testing the Breakeven feature using GBPUSD on MT4 ( Version 4.00 build 1355). I have set the SL at 100 points and TP 300 points, and Breakeven at 200 points with an instant execution, however as soon as price moves into profit, the SL moves to BE and the trades closes (as the spread is too close), unless price just continues to profit without a pull back . I have tried changing the TP to 3000 points and the Breakeven to 2000 however, the Breakeven feature moves the SL in the same way no matter what parameters I use.

The magic number is set to 0 as default, and I am not if this will have an effect on its behaviour.

I have also tried this with US30 and US500

Apologies if I have misunderstood this feature and set this up incorrectly.
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
I am testing the Breakeven feature using GBPUSD on MT4 ( Version 4.00 build 1355). I have set the SL at 100 points and TP 300 points, and Breakeven at 200 points with an instant execution, however as soon as price moves into profit, the SL moves to BE and the trades closes (as the spread is too close), unless price just continues to profit without a pull back . I have tried changing the TP to 3000 points and the Breakeven to 2000 however, the Breakeven feature moves the SL in the same way no matter what parameters I use.

The magic number is set to 0 as default, and I am not if this will have an effect on its behaviour.

I have also tried this with US30 and US500

Apologies if I have misunderstood this feature and set this up incorrectly.
I've just tested it and it worked fine for me. Could you please share screenshots of the trades (from history) and the relevant entries in the Journal tab (order modification) so that I could understand better what might go wrong?
 

kamthind

Newbie
Jul 27, 2022
6
2
4
34
I've just tested it and it worked fine for me. Could you please share screenshots of the trades (from history) and the relevant entries in the Journal tab (order modification) so that I could understand better what might go wrong?

I have attached screenshots of the last few trades I was testing - USDCAD and US30 - with both of these I was having the same problem as originally described. However, some trades with EURUSD and GBPUSD it seemed to work as expected, but other times it didn't, so I am not sure what I was doing different with the ones that did, and did not work.

This morning I placed 2 trades on US30, one as a buy and one as a sell, both with the BE parameter of 1000 points. When price went 1000 points up, the EA moved the SL to BE as expected, and I closed the trade and left the sell open. However, as price came down, as soon the sell position went into profit the EA moved the trade to BE and the trade was closed shortly after.
 

Attachments

  • Screenshot 2022-07-28 at 07.47.17.png
    Screenshot 2022-07-28 at 07.47.17.png
    1 MB · Views: 8
  • Screenshot 2022-07-28 at 07.46.40.png
    Screenshot 2022-07-28 at 07.46.40.png
    1.2 MB · Views: 9
  • Screenshot 2022-07-28 at 07.44.37.png
    Screenshot 2022-07-28 at 07.44.37.png
    779 KB · Views: 8
  • Screenshot 2022-07-28 at 08.33.37.png
    Screenshot 2022-07-28 at 08.33.37.png
    1,010.8 KB · Views: 8
Last edited:
  • ℹ️
Reactions: EnrichWave

JoeBull

Newbie
Jul 27, 2022
4
0
1
43
Hello,

How many opened trade can position size EA manage at the once?

Sorry, forgot to mention: on the same instrument. e.g.:EURUSD

Thank you!
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,837
981
144
Odessa
www.earnforex.com
I have attached screenshots of the last few trades I was testing - USDCAD and US30 - with both of these I was having the same problem as originally described. However, some trades with EURUSD and GBPUSD it seemed to work as expected, but other times it didn't, so I am not sure what I was doing different with the ones that did, and did not work.

This morning I placed 2 trades on US30, one as a buy and one as a sell, both with the BE parameter of 1000 points. When price went 1000 points up, the EA moved the SL to BE as expected, and I closed the trade and left the sell open. However, as price came down, as soon the sell position went into profit the EA moved the trade to BE and the trade was closed shortly after.
Thanks! I've fond the bug and fixed it. Please download the new version - 3.01.