Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
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.

Please refer to this tutorial for the installation process:
 
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
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: lasf25179 and EnrichWave

EnrichWave

Master Trader
May 15, 2018
325
82
74
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
18,532
1,355
144
Odesa
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
325
82
74
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
18,532
1,355
144
Odesa
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
325
82
74
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:

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
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

Trader
Jul 27, 2022
9
2
14
36
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
18,532
1,355
144
Odesa
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

Trader
Jul 27, 2022
9
2
14
36
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: 22
  • Screenshot 2022-07-28 at 07.46.40.png
    Screenshot 2022-07-28 at 07.46.40.png
    1.2 MB · Views: 21
  • Screenshot 2022-07-28 at 07.44.37.png
    Screenshot 2022-07-28 at 07.44.37.png
    779 KB · Views: 19
  • Screenshot 2022-07-28 at 08.33.37.png
    Screenshot 2022-07-28 at 08.33.37.png
    1,010.8 KB · Views: 19
Last edited:
  • ℹ️
Reactions: EnrichWave

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
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.