Requests & Ideas - page 279

 

...thanks for the look; something has definitely changed. Could it be passing the string in '_lopen (string,int)'? Would kernel32.dll be affected? Is MQ standing in the way of calls like this? If so, what about so many other Win32 API functions? If so, MQ is more than silly and there will be *many* unhappy people.

 
adeo:
...thanks for the look; something has definitely changed. Could it be passing the string in '_lopen (string,int)'? Would kernel32.dll be affected? Is MQ standing in the way of calls like this? If so, what about so many other Win32 API functions? If so, MQ is more than silly and there will be *many* unhappy people.

adeo

Try using this function (tested it and it should work now - but please let me know)

//------------------------------------------------------------------

//

//------------------------------------------------------------------

//

//

//

//

//

#define sectorSize 1936

#define HFILE_ERROR -1

void getSuffixPrefix()

{

int fileHandle = FileOpenHistory("symbols.raw",FILE_BIN|FILE_READ);

if (fileHandle == HFILE_ERROR) return;

//

//

//

//

//

prefix=""; suffix="";

for(int i=0;; i++)

{

FileSeek(fileHandle, sectorSize*i, SEEK_SET);

string symbolName = FileReadString(fileHandle,12);

symbolName = StringSubstr(symbolName, 0);

//

//

//

//

//

int pos = StringFind(symbolName,"EURUSD",0);

if (pos > -1)

{

if (pos>0) prefix = StringSubstr(symbolName,0,pos);

if ((pos+6)<StringLen(symbolName)) suffix = StringSubstr(symbolName,(pos+6),0);

break;

}

}

FileClose(fileHandle);

}

Seems that low level file operations (like _lopen) are not allowed any more, but we can use built in file operations (luckily)

 

Yes!, this works. Though we should add ' if (StringLen(symbolName) != 12) break;' to get out of the loop if using to get symbols list or where the eurusd comparison might fail Thanks

PS Any thoughts about coming up with a 'Forex-TSD' standard for 'new' MT4 files to avoid confusion (at least during the transition)? For example, filename_N.mq4, filename_4.mq4, filename_5.mq4 obviously many ways to go about it. I think it would be a good service to the users/community. I know I've devoted a few brain calories to file management as brokers resist upgrade for as long as possible...hopefully until bugs are worked out. It gets even more interesting when modifications introduce capabilities that are NOT downward compatible (I've seen a few already).

 

newMT4

Dear Mladen,

isallvolumeaverage_v2.mq4 new mt4 friendly ?

BEst regards

Files:
 
rosalieone:
Dear Mladen,

isallvolumeaverage_v2.mq4 new mt4 friendly ?

BEst regards

rosaliaone

Yes. Those are simple warnings that are not influencing the work of the indicator so it can be used in new metatrader 4 without changes

 

There we go - the filename could have answered that question before it was asked

 
mladen:
rosaliaone Yes. Those are simple warnings that are not influencing the work of the indicator so it can be used in new metatrader 4 without changes

Dear Mladen,

Thank you !

When you have time, what about rsx_nrp_v1_alerts.mq4

Have a nice day

Files:
 
rosalieone:
Dear Mladen,

Thank you !

When you have time, what about rsx_nrp_v1_alerts.mq4

Have a nice day

rosalieone

The good news is that that indicator is also 100% compatible with the new metatrader 4

 
mladen:
rosalieone The good news is that that indicator is also 100% compatible with the new metatrader 4

Muchos gracias !!!!!!!!!!!!!!!!!!!!!

 

mladen

can you check please why this ea is very profitable in demo and not so on real

the indi are here

Files:
Reason: