educarvalho

Newbie
Oct 22, 2023
3
0
2
35
Position Sizer updated to version 3.07 to offer multiple improvements and bug fixes:
  • Added an optional additional label for the Entry line to display the total position volume calculated by the Position Sizer. (Via GitHub)
  • Added new hotkeys (Shift+S and Shift+P by default) to switch stop-loss and take-profit values from level to points and vice versa. (@Lemonart)
  • Added risk-to-reward ratio calculations to the Risk tab. (@EnrichWave)
  • Added the expiration time field and parameter to allow setting a time limit for pending orders. (@logist18)
  • Added a new hotkey ('`' by default) to minimize/maximize the panel. (@Nathan.Küster)
  • Fixed TP button colors in the dark mode. (@Mio)
  • Fixed hotkeys to not trigger when they are set to work without Shift/Ctrl, but either Shift or Ctrl are pressed.
  • Fixed the margin calculation in the MT5 version to take into account the maintenance margin when required. (Via GitHub)
  • Fixed a bug when changing the hotkey input parameters for an already attached Position Sizer could fail to work. (@Elrye22)
  • Fixed a potential array out-of-range error that could appear under certain rare circumstances. (@Jakey88)
  • Fixed additional TP fields scaling on the panel for HiDPI screens. (@kamthind)
  • Changed the take-profit hotkey to switch off the TP-lock-on-SL when triggered. (@Mio)
  • Changed where the panel setting files are stored. They are now saved and loaded from the PS_Settings subfolder of MetaTrader's Files folder. Older settings files will be loaded correctly if they are found in the previous location.
  • Changed default colors for TP and SL lines to goldenrod and green respectively.
Hello!

I've been using Position Sizer for some time.

I want to suggest an improvement.
Please check the possibility of implementing the functionality in the future.

I noticed that the Position Sizer opens positions up to the maximum size defined by the Symbol specification.

When the Trader has an account with a high balance, with high leverage and which allows him to open large volume orders, it will be necessary to open several positions of maximum size.

For example:
Account Balance: 500,000.00
Leverage: 1:1000
Maximum Symbol Volume: 100
Volume to be opened: 600
Positions: 100 x 6

Is it possible to implement an improvement where Position Sizer can calculate the maximum position size supported by the account (based on StopLoss and Risk) and open several simultaneous orders that total the calculated maximum size?
Similar when there are several Take Profits.

I hope I was clear in my explanation!
Congratulations to those involved in this spectacular project!
Thank you very much!
 

woLVS

Trader
Oct 22, 2023
2
0
6
43
ERROR... MT4 VERSION

'#import' - #import was not closed stdlib.mqh 6 1solc
ERROR... MT4 VERSION

'#import' - #import was not closed stdlib.mqh 6 1

SOLVE:
//+------------------------------------------------------------------+
//| stdlib.mqh |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#import "stdlib.ex4"


string ErrorDescription(int error_code);
int RGB(int red_value,int green_value,int blue_value);
bool CompareDoubles(double number1,double number2);
string DoubleToStrMorePrecision(double number,int precision);
string IntegerToHexString(int integer_number);

#import <<<<< added this to file solved problem
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,203
1,499
144
Odesa
www.earnforex.com
//+------------------------------------------------------------------+
//| stdlib.mqh |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#import "stdlib.ex4"


string ErrorDescription(int error_code);
int RGB(int red_value,int green_value,int blue_value);
bool CompareDoubles(double number1,double number2);
string DoubleToStrMorePrecision(double number,int precision);
string IntegerToHexString(int integer_number);

#import <<<<< added this to file solved problem
stdlib.mqh is a part of MetaTrader's standard libraries. It should have had that line by default.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,203
1,499
144
Odesa
www.earnforex.com
Hello!

I've been using Position Sizer for some time.

I want to suggest an improvement.
Please check the possibility of implementing the functionality in the future.

I noticed that the Position Sizer opens positions up to the maximum size defined by the Symbol specification.

When the Trader has an account with a high balance, with high leverage and which allows him to open large volume orders, it will be necessary to open several positions of maximum size.

For example:
Account Balance: 500,000.00
Leverage: 1:1000
Maximum Symbol Volume: 100
Volume to be opened: 600
Positions: 100 x 6

Is it possible to implement an improvement where Position Sizer can calculate the maximum position size supported by the account (based on StopLoss and Risk) and open several simultaneous orders that total the calculated maximum size?
Similar when there are several Take Profits.

I hope I was clear in my explanation!
Congratulations to those involved in this spectacular project!
Thank you very much!
Yes, you can set SurpassBrokerMaxPositionSize to true.
 

akhtx

Trader
Oct 2, 2023
2
0
7
35
Has anyone run into the issue where the order type changes mid Take Profit zone entry? I attempted to enter a run of 5 Take Profits and at some point the order type kept shifting from Long to Short resulting in some losing trades :(

Also, on the occasion where I was able to place an order with 5 TPs, only 1 would be entered for trade...

Am I doing something wrong? I watched the demo videos and have been fiddling around with it, but it's been murder on my live account. Any suggestions?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,203
1,499
144
Odesa
www.earnforex.com
Has anyone run into the issue where the order type changes mid Take Profit zone entry? I attempted to enter a run of 5 Take Profits and at some point the order type kept shifting from Long to Short resulting in some losing trades :(

Also, on the occasion where I was able to place an order with 5 TPs, only 1 would be entered for trade...

Am I doing something wrong? I watched the demo videos and have been fiddling around with it, but it's been murder on my live account. Any suggestions?
First thing first, don't try to use it on a live account before trying everything you need on a demo account.

The order direction will change whenever the entry line gets through SL line.

Your next issue (only 1 out of 5 trades executing) suggests that you are likely trying to set up a very tight SL, which would also make the first issue more likely. However, it's difficult to tell you anything without looking at the output in the Experts tab when you try to execute your trades.
 

DragonElton

Trader
Nov 3, 2023
2
0
6
41
Good afternoon, there is a functionality that I did not find, and it is widely used in the Brazilian market, we call it "average transaction price".
Where the current transaction price is automatically adjusted according to partial contract realizations.
Example: If bought at 10,000 with 2 lots, and realizes half the position at 500 points in favor, then the current price adjusts to 9,500. It is very useful for creating a position in assets. Is there a possibility of including this function? Thank you for your attention.

Sorry for my english, its a google translator
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,203
1,499
144
Odesa
www.earnforex.com
Good afternoon, there is a functionality that I did not find, and it is widely used in the Brazilian market, we call it "average transaction price".
Where the current transaction price is automatically adjusted according to partial contract realizations.
Example: If bought at 10,000 with 2 lots, and realizes half the position at 500 points in favor, then the current price adjusts to 9,500. It is very useful for creating a position in assets. Is there a possibility of including this function? Thank you for your attention.

Sorry for my english, its a google translator
Sorry, but I don't understand. What does "the current price adjusts to 9,500" mean? The EA doesn't control the current price - it's controlled by the market.
 

DragonElton

Trader
Nov 3, 2023
2
0
6
41
Sorry, but I don't understand. What does "the current price adjusts to 9,500" mean? The EA doesn't control the current price - it's controlled by the market.
Good evening, to help with understanding, I made a video of how it works in practice.
Basically the number of points gained with the positive operation is calculated as distance from the entry point.
 

Attachments

  • ezgif.com-video-to-gif.gif
    ezgif.com-video-to-gif.gif
    564.3 KB · Views: 8

sunnysahu8210

Newbie
Nov 5, 2023
6
0
1
25
Hey Earn Forex Time, In Position Sizer can we have a partial closing via Limit order, instead of opening the multiple positions...like opening 1 Lot for 0.33 Lot in 3 parts.

Example - I want to open a single position In Gold and I’ve got a buy at with 1 Lot at $2000…

And expecting to reach $2010

but I also have to set a limit order at $2005 for partial closing at 0.5 Lot

The reason for this is, it has become too much of a hassle to have multiple positions as a swing/long-term trader.