EarnForex / PositionSizer

Calculate your position size based on the risk and account size and execute your trades with this free MetaTrader expert advisor.

Home Page:https://www.earnforex.com/metatrader-expert-advisors/Position-Sizer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PositionSizeCalculator Gets Removed Automatically Whenever Switching Timeframes...

lueny-toons opened this issue Β· comments

Hi,

I've been enjoying this wonderful tool for years and it has never failed me. However today upon updating from v2.41 to current v2.42 I encountered an issue which needs urgent attention. Upon compiling both PSC and PSC Script like usual, I was able to do the computation with PSC, say in H4 Timeframe (TF). BUT then whenever I switch to say D1 or any other TFs PSC automatically gets removed from my MT4 chart. Below is what I got upon checking the Journal section:-

"2022.05.14 23:41:51.304 Custom indicator PositionSizeCalculator EURUSD.ecn,Daily: removed"

I can reinstall and reattach the PSC again on D1 TF and I get this from the Journal:

"2022.05.14 23:52:04.828 Custom indicator ......\PositionSizeCalculator v2.41\PositionSizeCalculator EURUSD.ecn,Daily: loaded successfully"

BUT again when I switch to another TF, it gets removed immediately with this message in the Journal:

"2022.05.14 23:54:17.412 Custom indicator PositionSizeCalculator EURUSD.ecn,H1: removed"

I then proceeded to delete all traces of the current v2.42 and reinstalled the older v2.41 in hopes that it goes back to normal for me. However, even switching back to the older version doesn't help! The same issue keeps popping up. I definitely can attach PSC onto say H1 TF..., but whenever I switch to another TF it gets removed immediately... HELP please. Aargghh...

Can someone pls look into this urgently as I can't trade successfully with such interruptions when the software gets removed when it matters most during trading when I depend on this awesome tool/software.

Much thanks πŸ™ for the wonderful work put into this thus far. Kudos to all...

I wait patiently for the rectification...

Sincerely,
GL Tan
PSC error pg1

PSC error pg2

Hi!

What is the Build number of your MT4? You can check it via Help->About.
One solution I could propose is to download the source code of the indicator and compile it in your platform instead of downloading the release .ex4 file.

I located the Build number and it's as per attached; version 4.00 build 1355.

Screenshot 2022-05-15 at 1 32 20 AM

I'll try downloading the source code of PSC v2.42 and compile it in my platform to see if that works... But if I'm not mistaken I did that earlier and it was still the same error. I'll try it again and feedback you my situation. Thanks for the speedy revert and aid πŸ™

Hi,

I still get the same error :( I downloaded the v2.42 Source Code from GitHub here under the Code section. Deleted all previous traces of v2.41 and v2.42 in my terminal. Did a fresh compiling in the platform and like earlier..., it gets loaded onto the chart without any issues. The problem is that once I switch to any other new timeframes, automatically and immediately it gets removed and Experts section cites the below:

Screenshot 2022-05-15 at 1 52 16 AM

I am puzzled and am at a loss... And the new week is about to start in 1 days time for my trading. I depend a whole lot on PSC for my strategy. I hope you can help with this. I pray someone has a solution. Much thanks and patiently hoping for things to be sorted out

TQ...

The current latest release build of MT4 is 1353. That 1355 appears to be some beta build and is likely causing the issue. Could you try downgrading it?

The current latest release build of MT4 is 1353. That 1355 appears to be some beta build and is likely causing the issue. Could you try downgrading it?

ehh...πŸ€” I have no idea where to get the downgraded build of MT4 1353. I downloaded from the Brokerage firm Forex.com website. I can't seem to find the generic MT4 of build no. 1353 after searching the Net πŸ₯Ί. Somehow the links push me to download MT5 instead. Would you happen to have any link to a solid MT4 1353 build that I could download from...? πŸ™

You can only download it from a broker. However, I've just tested it on 1355 and timeframe switching there works fine. Are you on Windows or some other OS?

You can only download it from a broker. However, I've just tested it on 1355 and timeframe switching there works fine. Are you on Windows or some other OS?

Over the many years... I've been running on both Wine platform for Mac with .dmg files and using Crossover for Windows on .exe files. I have both platforms on my Mac mini M1 (using MAC OS) just as a backup in case any one has a problem I can fall back on the other. Never had issues on both platforms thus far until now. It's not that the new build can't launch or boot up the PSC... Far from it. It can initiate and launch and can be used. The only hiccup is that upon switching any timeframes it just gets removed automatically. I check on my indicator list and it's gone. So, I have to reload and insert PSC back onto the charts every single time. Very time consuming and additional steps while trying to lock in trades fast... Somehow, something (a bug of sorts) is triggering; 1) PSC is already attached 2) Initialisation failed (1) 3) uninit reason 8 4) removed.

You can comment out the line #136 in PositionSizeCalculator.mq4 and check if it helps. Normally, it serves to protect against attaching a second instance of PSC to the chart, but, in your case, it looks like MT4 isn't deinitializing PSC properly when switching timeframes, so it prevents the only instance from actually loading.

You can comment out the line #136 in PositionSizeCalculator.mq4 and check if it helps. Normally, it serves to protect against attaching a second instance of PSC to the chart, but, in your case, it looks like MT4 isn't deinitializing PSC properly when switching timeframes, so it prevents the only instance from actually loading.

Oh Gosh! Programming is something totally foreign for me in this instance... 😰. I totally can't understand and see coding in that context. I can trade but am shites when dealing with coding lines. πŸ₯ΊπŸ˜–. How and what do I do when you say comment out line #136 ? I can attempt going into the coding structure using Metaeditor and change out or take out what you mentioned BUT need assistance with what to omit or edit, especially comment out the line #136. Appreciate any hand holding assistance I can get πŸ™. I'll attempt to do it as I'm desperate... Much thanks πŸ‘

There is this code on line #136 (you can Ctrl+G to a specific line in MetaEditor):
return INIT_FAILED;
It should be changed to this:
//return INIT_FAILED;
Then just recompile.

There is this code on line #136 (you can Ctrl+G to a specific line in MetaEditor):
return INIT_FAILED;
It should be changed to this:
//return INIT_FAILED;
Then just recompile.

Great stuff. Thanks a whole lot for your assistance and patience. I shall attempt to try it out and fingers crossed..., all wd be fine. If not I'll tear out my hair out of frustration. LOL... I shall update you if and when I have done it. Cheerio mate

update: MY GAWD! It really worked... :) I'm so ecstatic as I'm back in biz ready for coming week's trading. You are my hero and God-sent. I appreciate all your guidance and time taken to help out. Again..., a big TQ mate πŸ˜‡πŸ€πŸ€™