I found and adjusted the needed lines in the 'Position Sizer Trading.mqh' file. Now it is working fine.
I put // in front of lines 285 - 290 and 318 -340
and then re-compile: position sizer.mq4

Code:
        //if ((Execution_Mode == SYMBOL_TRADE_EXECUTION_MARKET) && (sets.EntryType == Instant))
        //{
        //    // No SL/TP allowed on instant orders.
        //    order_sl = 0;
        //    order_tp = 0;
        //}

Code:
        //if ((Execution_Mode == SYMBOL_TRADE_EXECUTION_MARKET) && (sets.EntryType == Instant) && (ticket != -1) && ((sl != 0) || (tp != 0)))
        //{
        //    if (!OrderSelect(ticket, SELECT_BY_TICKET))
        //    {
        //        Print("Failed to find the order to apply SL/TP.");
        //        isOrderPlacementFailing = true;
        //        break;
        //    }
        //    for (int i = 0; i < 10; i++)
        //    {
        //        if ((tp != 0) && (((tp <= OrderOpenPrice()) && (ot == OP_BUY)) || ((tp >= OrderOpenPrice()) && (ot == OP_SELL)))) tp = 0; // Do not apply TP if it is invald. SL will still be applied.
        //        bool result = OrderModify(ticket, OrderOpenPrice(), sl, tp, OrderExpiration());
        //        if (result)
        //        {
        //            break;
        //        }
        //        else
        //        {
        //            Print("Error modifying the order: ", GetLastError());
        //            isOrderPlacementFailing = true;
        //        }
        //    }
        //}
Surprisingly (to me), it looks like brokers now don't care whether it is Market or Instant execution type and allow attached SL/TP in both cases. I will remove these checks in the next version of the PS EA. Thanks for pointing this out!
 
Surprisingly (to me), it looks like brokers now don't care whether it is Market or Instant execution type and allow attached SL/TP in both cases. I will remove these checks in the next version of the PS EA. Thanks for pointing this out!
May be that feature needed for sometimes. So, make option to enable,disable it.

Regards
 
@Enivid , Also make option to enable disable sound (when we placing orders), It sounds even If we have disabled in event option.
I already had this planned. As a temporary solution, you can remove the timeout.wav and ok.wav files from the Sounds folder of your MT4 installation (not the data folder!).
 
  • 👍
Reactions: EnrichWave
You can right-click somewhere in that log (Experts) and select Viewer. It will open the entire log. Could you please either copy and paste it into a text file and send it to me or try to find any mention of an error - something similar to this:
View attachment 22543
Hi Enivid, I looked and checked every list for warnings and could not see any at all. I did not know how to copy and paste it sorry. Today it has been loading to the screen ok but sometimes freezing.
It seems to work better when i have a clean chart and no indicators on . Now its been loading fine on all pairs but ........now it wont execute a trade saying algo trading is disabled . Algo trading is on and box is ticked on the EA. Heres some screen shots.
https://charts.mql5.com/33/759/nas100-m1-pepperstone-markets-limited.png
https://charts.mql5.com/33/759/xauusd-m1-pepperstone-markets-limited-3.png
 
The fact that it is working one day and not working the other may be because the broker forbids trades without SL during specific time periods? Or around specific Forex news announcements?
I don't have an explanation for it, but I have finally diagnosed the problem. I always trade during the last hour of the day, an hour before the NY close. It's during that time period that the orders from the Position Sizer get rejected. If I place an order an hour earlier or later than that, everything works fine. Oddly, this didn't use to be the case, only in the last 4 months or so. It must be something with The5%ers broker settings that they recently changed. Never had an issue with it working on Eightcap.
 
  • 👍
Reactions: aalfath
Hi Enivid, I looked and checked every list for warnings and could not see any at all. I did not know how to copy and paste it sorry. Today it has been loading to the screen ok but sometimes freezing.
It seems to work better when i have a clean chart and no indicators on . Now its been loading fine on all pairs but ........now it wont execute a trade saying algo trading is disabled . Algo trading is on and box is ticked on the EA. Heres some screen shots.
https://charts.mql5.com/33/759/nas100-m1-pepperstone-markets-limited.png
https://charts.mql5.com/33/759/xauusd-m1-pepperstone-markets-limited-3.png
Algo Trading is disabled in your platform - see this image for reference:
https://www.earnforex.com/mt4-expert-advisors/images/PS/allow-algo-trading-mt5.png
 
Dear @Enivid If there is possible that you can add option to view buy average, sell average price for multiple orders that will be great one. If not possible in this EA, Kindly make a seperate Indicator

Regards
 
  • 👍
Reactions: CARPARK
Suggestion: As I risk in % and this changes on every trade I am unable to use that useful breakeven function. Is there a way some kind of % or RR could be added? For example if trade hits 1:x RR then add BE stop?
 
Hi, Having issues with sizing on check boxes and header. Cannot even minimize the EA. Worked on desktop, but just got a xps15 and this is happening. Win 11 and MT5. I would appreciate any help with this. Thanks!

1663026700609.png
 
What exactly is the problem?
I cannot minimize the position sizer dialog box. It stays on top of the chart. Functions still work, but I cannot minimize it. Also, not sure if it is related, but notice that the check boxes and dialog header is smaller in size for some reason. I am using the latest FTMO 64 bit MT5 build. Thanks.
 
I cannot minimize the position sizer dialog box. It stays on top of the chart. Functions still work, but I cannot minimize it. Also, not sure if it is related, but notice that the check boxes and dialog header is smaller in size for some reason. I am using the latest FTMO 64 bit MT5 build. Thanks.
The checkboxes look like that probably due to some Windows-based settings. As for the inability to minimze, could you please check the output in the Experts tab after you attach the EA and try to minimize it? By the way, does closing it by clicking on the 'x' work?
 
The checkboxes look like that probably due to some Windows-based settings. As for the inability to minimze, could you please check the output in the Experts tab after you attach the EA and try to minimize it? By the way, does closing it by clicking on the 'x' work?
The 'x' works and it removes the dialog. There is no output to the screen when I try to minimize.
1663084020612.png
 
This is a great calculator except PSC-Trader doesn't work in Eightcap-demo as I attempt to use it during the Funded Trader's monthly challenge. Is there a problem with it/?
 
Hi,
Having a little trouble getting the PSC Trader to link with the Position sizer indicator. Has anyone had this issue?
 

Attachments

  • Script not found.PNG
    Script not found.PNG
    85.6 KB · Views: 8