Please help me solve this mystery!! - page 3

 
ernest02:

I have created a folder under C:/ where I have installed MT4, but I have two other copies (one live & one demo) which are installed under Program Files (x86).

I do not have any log files with the last two but do have log files under the root MT4. (That is why I can report on what is in the Log file)

Now I have just noticed another anomaly. (I already mentioned the fact that I get different results from two identical runs)

I use iCCI to track the CCI index to make Buy/Sell transaction decisions. I have discovered that transactions happen even when the CCI condition is not true!

This is such a mess! I long back to my XP days where my system seemed to be much more simpler and stabler!

I am about ready to throw in the towel!

1. CCI is calculated using PRICE_TYPICAL - see CCI code in MetaEditor - so what price type your iCCI use ?

2. The journal log I was talking about was a tester journal log. It should be located at tester\logs folder where you installed MT or if you still install it on C:\Program Files\..., it will be at C:\Users\<user name>\AppData\Local\VirtualStore\Program Files\... . The location of Virtual Store for MT4 and MT5 is different.

 

I first used PRICE_TYPICAL for CCI, but when I saw that there are transactions happening while the Hour bar was still in process and before the price is Closed, I changed to PRICE_CLOSE but the Tester did not wait for the bar to close before it did  transaction., so it did not make a difference.

About the Journal Log File - I was told that the Tester did not generate a Log file if installed under Program Files, so I installed a copy of MT4 under the root (C:/) just for that reason. Now I see that it does actually create a Log file in the Virtual Store. Only one problem is I cannot even open even a "small" file (<70Mb) with Note pad, or even Notepad++, where under XP I could open files of hundreds of Mb's with Notepad.

I actually moved the EA to my old XP laptop to see if I will experience the same problems there and when I tried to run it it said there were some errors in the file and that I must recompile it. I did it and now it is running, but unfortunately the data on this computer is very old and so I could not compare the same time periods (so far), but from first glance I seem to experience the same problems, e.g. no transactions recorded in the Journal, etc.

 
ernest02:

I first used PRICE_TYPICAL for CCI, but when I saw that there are transactions happening while the Hour bar was still in process and before the price is Closed, I changed to PRICE_CLOSE but the Tester did not wait for the bar to close before it did  transaction., so it did not make a difference.

About the Journal Log File - I was told that the Tester did not generate a Log file if installed under Program Files, so I installed a copy of MT4 under the root (C:/) just for that reason. Now I see that it does actually create a Log file in the Virtual Store. Only one problem is I cannot even open even a "small" file (<70Mb) with Note pad, or even Notepad++, where under XP I could open files of hundreds of Mb's with Notepad.

I actually moved the EA to my old XP laptop to see if I will experience the same problems there and when I tried to run it it said there were some errors in the file and that I must recompile it. I did it and now it is running, but unfortunately the data on this computer is very old and so I could not compare the same time periods (so far), but from first glance I seem to experience the same problems, e.g. no transactions recorded in the Journal, etc.

I use EmEditor to open huge, GBs, log files with no problems,  Notepad has never been able to handle very big files and even when it tried to it was very slow.

If you want me to look at the issue you are having with your EA I'd be happy to take a look,  send me a PM if you don't want to publish your code here.  I know how frustrating it can get spending several days trying to find an issue.
 
RaptorUK:
...
If you want me to look at the issue you are having with your EA I'd be happy to take a look,  send me a PM if you don't want to publish your code here.  I know how frustrating it can get spending several days trying to find an issue.

Send me two ;)
 
phi.nuts:
Send me two ;)


I really appreciate your offer to help. I tried to connect to your profile to send you aPM with the code files attached, but I am having a problem opening your profile page.

I could open RaptorUK's profile successfully, but your's keep hanging and does not want to open. My Internet is very slow tonight. I'll try again tomorrow morning.

Thanks again!

 
ernest02:

I really appreciate your offer to help. I tried to connect to your profile to send you aPM with the code files attached, but I am having a problem opening your profile page.

I could open RaptorUK's profile successfully, but your's keep hanging and does not want to open. My Internet is very slow tonight. I'll try again tomorrow morning.

You need to add a trailing   /  https://www.mql5.com/en/users/phi.nuts/

I have PMed you back with some observations and a modified version of your code which should help with debugging. 

 
ernest02:

I really appreciate your offer to help. I tried to connect to your profile to send you aPM with the code files attached, but I am having a problem opening your profile page.

I could open RaptorUK's profile successfully, but your's keep hanging and does not want to open. My Internet is very slow tonight. I'll try again tomorrow morning.

Thanks again!

My user name has dot in it, that's why no one - including me - can't open my profile page, from the first time :(.

Just click "note icon" below my avatar and you'll be directed to send message to me.

 

Get rid of this Print, it will print on every tick

int start()
  {
  
  Print("Start...at the beginning");
// Calculate Lotsize

If you don't want to get rid of it, put it on init.

 
phi.nuts:

Get rid of this Print, it will print on every tick

If you don't want to get rid of it, put it on init.


I will get rid of the Print as suggested.

Any other advice to solve my problem?

I am attaching a document that shows how different the same EA performs under different MT4 demo terminals from the same broker.

Under the one it shows only ONE transaction at the wrong place, and under the other terminal it shows SEVEN transactions!!

How can one explain that??

Files:
 
ernest02:

I will get rid of the Print as suggested.

Any other advice to solve my problem?

I am attaching a document that shows how different the same EA performs under different MT4 demo terminals from the same broker.

Under the one it shows only ONE transaction at the wrong place, and under the other terminal it shows SEVEN transactions!!

Maybe it is something to do with your CCIReal variable,  it is a CCI value for bar 0 so it is likely to be different for each tick during the formation of bar 0, using PRICE_CLOSE just means that you are using Close[0] value for Bar 0 which is the same as Bid.
Reason: